services: postgres: image: postgres:16-alpine restart: unless-stopped environment: POSTGRES_DB: gateway POSTGRES_USER: postgres POSTGRES_PASSWORD: gateway ports: - "5432:5432" volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres -d gateway"] interval: 5s timeout: 3s retries: 10 gateway: build: context: . dockerfile: packages/gateway/Dockerfile restart: unless-stopped environment: # Local smoke tests: session + leaderboard routes expect an API key when keys are configured. CHAOSCHAIN_API_KEYS: local_docker_dev_key # Avoid placeholder Alchemy URL during local Docker (background RPC use). RPC_URL: https://ethereum-sepolia-rpc.publicnode.com ports: - "3000:3000" - "9090:9090" env_file: - path: packages/gateway/.env.docker required: true - path: packages/gateway/.env.docker.local required: false depends_on: postgres: condition: service_healthy healthcheck: test: ["CMD-SHELL", "wget -qO- http://localhost:3000/health || exit 1"] interval: 15s timeout: 5s retries: 5 start_period: 20s volumes: pgdata: