services: postgres: image: postgres:16-alpine restart: unless-stopped environment: POSTGRES_USER: ${POSTGRES_USER:-acw} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-acw} POSTGRES_DB: ${POSTGRES_DB:-acw} volumes: - acw-pg-data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-acw}"] interval: 5s timeout: 5s retries: 10 app: image: git.jerryyan.net/q792602257/agent-coding-workflow:latest build: . restart: unless-stopped environment: APP_ENV: production APP_HTTP_ADDR: ":8080" APP_DB_DSN: "postgres://${POSTGRES_USER:-acw}:${POSTGRES_PASSWORD:-acw}@postgres:5432/${POSTGRES_DB:-acw}?sslmode=disable" APP_MASTER_KEY: "${APP_MASTER_KEY}" APP_DATA_DIR: "/data" APP_BOOTSTRAP_ADMIN_EMAIL: "${APP_BOOTSTRAP_ADMIN_EMAIL:-admin@local}" APP_BOOTSTRAP_ADMIN_PASSWORD: "${APP_BOOTSTRAP_ADMIN_PASSWORD}" ports: - "8080:8080" volumes: - acw-data:/data depends_on: postgres: condition: service_healthy healthcheck: test: ["CMD", "wget", "-q", "--spider", "http://localhost:8080/healthz"] interval: 10s timeout: 5s retries: 6 start_period: 30s volumes: acw-pg-data: acw-data: