Spaces:
Running
Running
File size: 1,162 Bytes
79b0bef | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | # 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
|