feat: comprehensive docs, unit tests, docker-compose app services

- Add scheduler and ingestion unit tests (test_scheduler_unit.py, test_ingestion_unit.py)
- Add all 13 app services + dashboard to docker-compose.yml
- Add full documentation suite: API reference, Helm reference, Docker deployment guide,
  3 architecture diagrams (K8s, Docker Compose, data pipeline), AI agent guide,
  backup/restore guide, observability/metrics reference, per-service docs
- Add intelligence pipeline deep-dive docs with Mermaid diagrams
- Update README with documentation index and links
- Add specs for comprehensive-quality-docs, intelligence-pipeline-deep-dive,
  sanitized-pipeline-docs
This commit is contained in:
Celes Renata
2026-04-22 02:56:41 +00:00
parent f251c53f92
commit 88ad1e8d99
57 changed files with 13318 additions and 51 deletions
+300
View File
@@ -1,6 +1,21 @@
version: "3.9"
x-app-env: &app-env
POSTGRES_HOST: postgres
POSTGRES_PORT: "5432"
POSTGRES_DB: stonks
POSTGRES_USER: stonks
POSTGRES_PASSWORD: stonks_dev
REDIS_HOST: redis
REDIS_PORT: "6379"
MINIO_ENDPOINT: minio:9000
MINIO_ACCESS_KEY: minioadmin
MINIO_SECRET_KEY: minioadmin
OLLAMA_BASE_URL: http://ollama:11434
services:
# ── Infrastructure ──────────────────────────────────────────────
postgres:
image: postgres:16-alpine
environment:
@@ -109,6 +124,291 @@ services:
depends_on:
- trino
# ── Application Services ────────────────────────────────────────
scheduler:
build:
context: .
dockerfile: docker/Dockerfile.scheduler
environment:
<<: *app-env
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "pgrep -f 'python -m services.scheduler.app' || exit 1"]
interval: 10s
timeout: 5s
retries: 3
start_period: 15s
restart: unless-stopped
symbol-registry:
build:
context: .
dockerfile: docker/Dockerfile
args:
SERVICE_CMD: "uvicorn services.symbol_registry.app:app --host 0.0.0.0 --port 8000"
environment:
<<: *app-env
ports:
- "8001:8000"
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8000/health || exit 1"]
interval: 10s
timeout: 5s
retries: 3
start_period: 15s
restart: unless-stopped
ingestion:
build:
context: .
dockerfile: docker/Dockerfile
args:
SERVICE_CMD: "python -m services.ingestion.worker"
environment:
<<: *app-env
env_file:
- .env
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
minio:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "pgrep -f 'python -m services.ingestion.worker' || exit 1"]
interval: 10s
timeout: 5s
retries: 3
start_period: 15s
restart: unless-stopped
parser:
build:
context: .
dockerfile: docker/Dockerfile
args:
SERVICE_CMD: "python -m services.parser.worker"
environment:
<<: *app-env
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "pgrep -f 'python -m services.parser.worker' || exit 1"]
interval: 10s
timeout: 5s
retries: 3
start_period: 15s
restart: unless-stopped
extractor:
build:
context: .
dockerfile: docker/Dockerfile
args:
SERVICE_CMD: "python -m services.extractor.main"
environment:
<<: *app-env
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
ollama:
condition: service_started
healthcheck:
test: ["CMD-SHELL", "pgrep -f 'python -m services.extractor.main' || exit 1"]
interval: 10s
timeout: 5s
retries: 3
start_period: 15s
restart: unless-stopped
aggregation:
build:
context: .
dockerfile: docker/Dockerfile
args:
SERVICE_CMD: "python -m services.aggregation.main"
environment:
<<: *app-env
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "pgrep -f 'python -m services.aggregation.main' || exit 1"]
interval: 10s
timeout: 5s
retries: 3
start_period: 15s
restart: unless-stopped
recommendation:
build:
context: .
dockerfile: docker/Dockerfile
args:
SERVICE_CMD: "python -m services.recommendation.main"
environment:
<<: *app-env
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "pgrep -f 'python -m services.recommendation.main' || exit 1"]
interval: 10s
timeout: 5s
retries: 3
start_period: 15s
restart: unless-stopped
trading-engine:
build:
context: .
dockerfile: docker/Dockerfile
args:
SERVICE_CMD: "uvicorn services.trading.app:app --host 0.0.0.0 --port 8000"
environment:
<<: *app-env
env_file:
- .env
ports:
- "8002:8000"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8000/health || exit 1"]
interval: 10s
timeout: 5s
retries: 3
start_period: 15s
restart: unless-stopped
risk-engine:
build:
context: .
dockerfile: docker/Dockerfile
args:
SERVICE_CMD: "uvicorn services.risk.app:app --host 0.0.0.0 --port 8000"
environment:
<<: *app-env
ports:
- "8003:8000"
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8000/health || exit 1"]
interval: 10s
timeout: 5s
retries: 3
start_period: 15s
restart: unless-stopped
broker-adapter:
build:
context: .
dockerfile: docker/Dockerfile
args:
SERVICE_CMD: "python -m services.adapters.broker_service"
environment:
<<: *app-env
env_file:
- .env
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "pgrep -f 'python -m services.adapters.broker_service' || exit 1"]
interval: 10s
timeout: 5s
retries: 3
start_period: 15s
restart: unless-stopped
lake-publisher:
build:
context: .
dockerfile: docker/Dockerfile
args:
SERVICE_CMD: "python -m services.lake_publisher.jobs"
environment:
<<: *app-env
depends_on:
postgres:
condition: service_healthy
minio:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "pgrep -f 'python -m services.lake_publisher.jobs' || exit 1"]
interval: 10s
timeout: 5s
retries: 3
start_period: 15s
restart: unless-stopped
query-api:
build:
context: .
dockerfile: docker/Dockerfile
args:
SERVICE_CMD: "uvicorn services.api.app:app --host 0.0.0.0 --port 8000"
environment:
<<: *app-env
ports:
- "8004:8000"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
minio:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8000/health || exit 1"]
interval: 10s
timeout: 5s
retries: 3
start_period: 15s
restart: unless-stopped
dashboard:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "3000:8080"
depends_on:
query-api:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080/ || exit 1"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
restart: unless-stopped
volumes:
pgdata:
miniodata: