services: db: image: postgres:16 container_name: qtw-postgres environment: POSTGRES_USER: qtw POSTGRES_PASSWORD: qtw POSTGRES_DB: qtw ports: - "5432:5432" volumes: - qtw_pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U qtw -d qtw"] interval: 5s timeout: 3s retries: 10 backend: build: context: ./backend container_name: qtw-backend depends_on: db: condition: service_healthy environment: DATABASE_URL: postgresql+asyncpg://qtw:qtw@db:5432/qtw MARKET_DATA_SOURCE: synthetic GUROBI_IN_RACE: "0" # Optional: set SMTP_PASSWORD (a Resend API key) in the host env to email # API keys for real; unset → the console sender logs the key to the backend # container logs. SMTP_USERNAME is the literal "resend". SMTP_HOST: ${SMTP_HOST:-smtp.resend.com} SMTP_PORT: ${SMTP_PORT:-587} SMTP_USERNAME: ${SMTP_USERNAME:-resend} SMTP_PASSWORD: ${SMTP_PASSWORD:-} EMAIL_FROM: ${EMAIL_FROM:-Qubitrefill } # Registration digest — daily contact-list email to the team. Defaults to # the BD alias; set DIGEST_RECIPIENTS="" to disable (fail-closed). Also # inert without SMTP_PASSWORD, so it can never fall back to logging the list. DIGEST_RECIPIENTS: ${DIGEST_RECIPIENTS-bd@postquant.xyz} DIGEST_HOUR_UTC: ${DIGEST_HOUR_UTC:-7} ports: - "8000:8000" healthcheck: test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/healthz')"] interval: 10s timeout: 3s retries: 5 start_period: 20s volumes: qtw_pgdata: