Files
gti d21a9d1140 Add 'fiscal/' from commit '102ba84500dbd9655a0471288c3e278652593ca9'
git-subtree-dir: fiscal
git-subtree-mainline: d95165fc8f
git-subtree-split: 102ba84500
2026-09-29 14:43:23 -03:00

60 lines
2.4 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}
ALLOW_WEAK_DEV_PASSWORD: "1"
LOG_LEVEL: ${LOG_LEVEL:-INFO}
BASE_URL: ${BASE_URL:-http://localhost:8000}
AGENT_ONLINE_THRESHOLD_SECONDS: ${AGENT_ONLINE_THRESHOLD_SECONDS:-120}
# Z.ai (OpenAI-compatible) — key only from the local .env, never committed/logged.
AI_API_KEY: ${AI_API_KEY:-}
AI_BASE_URL: ${AI_BASE_URL:-https://api.z.ai/api/paas/v4}
AI_MODEL: ${AI_MODEL:-glm-5.3}
AI_PRICE_IN_PER_M: ${AI_PRICE_IN_PER_M:-}
AI_PRICE_OUT_PER_M: ${AI_PRICE_OUT_PER_M:-}
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: