services: app: image: git.fabledsword.com/bvandeusen/fabledgrimoire:latest environment: DATABASE_URL: "postgresql+asyncpg://${POSTGRES_USER:-grimoire}:${DB_PASSWORD}@db:5432/${POSTGRES_DB:-grimoire}" # A Swarm can start the app on another node, away from the key kept in # a node-local /data volume, so a stack sets its key itself (or mounts # a Docker secret and sets SECRET_KEY_FILE to its path). SECRET_KEY: "${SECRET_KEY}" LOG_LEVEL: "${LOG_LEVEL:-INFO}" TRUST_PROXY_HEADERS: "true" SECURE_COOKIES: "true" volumes: - app_data:/data networks: - backend db: # Postgres 17 with the vector extension Grimoire needs. image: pgvector/pgvector:pg17 stop_grace_period: 120s volumes: - pgdata:/var/lib/postgresql/data environment: POSTGRES_USER: ${POSTGRES_USER:-grimoire} POSTGRES_PASSWORD: "${DB_PASSWORD}" POSTGRES_DB: ${POSTGRES_DB:-grimoire} networks: - backend volumes: pgdata: name: ${PGDATA_VOLUME:-grimoire_pgdata} app_data: networks: backend: driver: overlay