name: stoa services: postgres: image: postgres:17.6-alpine environment: POSTGRES_DB: stoa POSTGRES_USER: stoa POSTGRES_PASSWORD: ${STOA_POSTGRES_PASSWORD:-local-development-only} ports: - "127.0.0.1:5432:5432" volumes: - stoa-postgres:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U stoa -d stoa"] interval: 5s timeout: 3s retries: 12 restart: unless-stopped api: build: context: . dockerfile: packaging/server.Dockerfile environment: STOA_ENV: production STOA_API_HOST: 0.0.0.0 STOA_API_PORT: 8787 STOA_DATABASE_URL: postgresql+psycopg://stoa:${STOA_POSTGRES_PASSWORD:-local-development-only}@postgres:5432/stoa ports: - "127.0.0.1:8787:8787" depends_on: postgres: condition: service_healthy read_only: true tmpfs: - /tmp:size=64m,noexec,nosuid security_opt: - no-new-privileges:true restart: unless-stopped volumes: stoa-postgres: