services: api: build: . ports: - "8000:8000" volumes: # Model artifacts are built by the training run, not baked into the image. - ./models:/app/models:ro healthcheck: test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"] interval: 10s timeout: 5s retries: 6 start_period: 20s dashboard: build: . command: > streamlit run app/dashboard.py --server.port 8501 --server.address 0.0.0.0 --server.headless true ports: - "8501:8501" environment: API_URL: http://api:8000 volumes: - ./models:/app/models:ro - ./data:/app/data:ro - ./reports:/app/reports:ro depends_on: api: condition: service_healthy