# Production: run both Postgres and the app # Usage: docker compose -f docker-compose.prod.yml up -d --build services: db: image: postgres:17-alpine restart: unless-stopped environment: POSTGRES_USER: grasshopper POSTGRES_PASSWORD: grasshopper POSTGRES_DB: grasshopper volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U grasshopper"] interval: 5s timeout: 3s retries: 5 app: build: . restart: unless-stopped ports: - "3000:3000" environment: DATABASE_URL: postgresql://grasshopper:grasshopper@db:5432/grasshopper BETTER_AUTH_URL: http://localhost:3000 BETTER_AUTH_SECRET: ${BETTER_AUTH_SECRET} GITHUB_CLIENT_ID: ${GITHUB_CLIENT_ID:-} GITHUB_CLIENT_SECRET: ${GITHUB_CLIENT_SECRET:-} GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID:-} GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET:-} RESEND_API_KEY: ${RESEND_API_KEY:-} CRON_SECRET: ${CRON_SECRET:-} depends_on: db: condition: service_healthy volumes: pgdata: