# docker-compose.yml # Local development stack: API + Streamlit dashboard # # Usage: # docker-compose up # start everything # docker-compose up api # API only # docker-compose down # stop and remove containers version: "3.9" services: api: build: context: . target: runtime ports: - "8000:8000" environment: - DATABASE_URL=${DATABASE_URL:-sqlite:////app/clinical_nlp.db} - LOG_LEVEL=${LOG_LEVEL:-INFO} - API_DEBUG=${API_DEBUG:-true} volumes: # Mount data directory so the DB and processed files persist - ./data:/app/data healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8000/health"] interval: 10s timeout: 5s retries: 3 dashboard: build: context: . target: runtime command: streamlit run dashboard/app.py --server.port=8501 --server.address=0.0.0.0 ports: - "8501:8501" environment: - API_BASE_URL=http://api:8000 - DATABASE_URL=${DATABASE_URL:-sqlite:////app/clinical_nlp.db} volumes: - ./data:/app/data depends_on: api: condition: service_healthy