COTexplorer/docker-compose.yml
Greg 37f8eac932 Initial commit: CFTC COT Explorer
FastAPI application that ingests CFTC Commitments of Traders data into SQLite
and exposes it via a REST API with analytics endpoints (screener, percentile rank,
concentration). Includes CLI for historical and weekly data ingestion, Docker setup,
and a frontend.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 11:23:00 +01:00

39 lines
829 B
YAML

services:
web:
build: .
container_name: cot_web
ports:
- "8000:8000"
volumes:
- cot_data:/data
environment:
- DB_PATH=/data/cot.db
command: >
sh -c "python3 -m app.ingestion.cli init-db &&
uvicorn app.api.main:app --host 0.0.0.0 --port 8000"
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
cron:
build: .
container_name: cot_cron
volumes:
- cot_data:/data
- ./data:/app/data
environment:
- DB_PATH=/data/cot.db
command: /app/scripts/cron_entrypoint.sh
restart: unless-stopped
depends_on:
web:
condition: service_healthy
volumes:
cot_data:
driver: local