53 lines
2.1 KiB
YAML
53 lines
2.1 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_DB: ${POSTGRES_DB:-gti_fiscal}
|
|
POSTGRES_USER: ${POSTGRES_USER:-gti}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-development-only}
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-gti} -d ${POSTGRES_DB:-gti_fiscal}"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 20
|
|
restart: unless-stopped
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
fiscal-hub:
|
|
build:
|
|
context: .
|
|
dockerfile: central/Dockerfile
|
|
environment:
|
|
# Intentionally NOT passing DATABASE_URL here: central/app/config.py builds
|
|
# it from POSTGRES_PASSWORD against the "postgres" service by default. If
|
|
# you need a different Postgres host, set DATABASE_URL_OVERRIDE in a
|
|
# docker-compose.override.yml — never via the shared .env, which also
|
|
# holds the host-side (localhost-pointing) DATABASE_URL used by scripts
|
|
# that run outside Docker.
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-development-only}
|
|
# Leave AGENT_DEV_TOKEN unset outside local development. Real Agents are
|
|
# created with central/scripts/register_agent.py, never via this variable.
|
|
AGENT_DEV_TOKEN: ${AGENT_DEV_TOKEN:-}
|
|
APP_ENV: ${APP_ENV:-development}
|
|
LOG_LEVEL: ${LOG_LEVEL:-INFO}
|
|
BASE_URL: ${BASE_URL:-http://localhost:8000}
|
|
AGENT_ONLINE_THRESHOLD_SECONDS: ${AGENT_ONLINE_THRESHOLD_SECONDS:-120}
|
|
volumes:
|
|
# Read-only access to locally-held official source documents (PDFs/XLSX
|
|
# with no stable public direct-download URL) for the one-off dataset
|
|
# import scripts under central/scripts/. Never written to by the app.
|
|
- ./sources:/app/sources:ro
|
|
ports:
|
|
- "${HUB_PORT:-8000}:8000"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 20
|
|
restart: unless-stopped
|
|
volumes:
|
|
postgres_data:
|