Hopcroft-Skill-Classification / docker-compose.yml
DaCrow13
Deploy to HF Spaces (Clean)
225af6a
raw
history blame
1.56 kB
services:
hopcroft-api:
build:
context: .
dockerfile: Dockerfile
container_name: hopcroft-api
ports:
- "8080:8080"
env_file:
- .env
environment:
- PROJECT_NAME=Hopcroft
volumes:
# Bind mount: enables live code reloading for development
- ./hopcroft_skill_classification_tool_competition:/app/hopcroft_skill_classification_tool_competition
# Named volume: persistent storage for application logs
- hopcroft-logs:/app/logs
networks:
- hopcroft-net
# Override CMD for development with auto-reload
command: >
uvicorn hopcroft_skill_classification_tool_competition.main:app --host 0.0.0.0 --port 8080 --reload
restart: unless-stopped
healthcheck:
test: [ "CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8080/health', timeout=5)" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
hopcroft-gui:
build:
context: .
dockerfile: Dockerfile.streamlit
container_name: hopcroft-gui
ports:
- "8501:8501"
environment:
- API_BASE_URL=http://hopcroft-api:8080
volumes:
# Bind mount for development hot-reload
- ./hopcroft_skill_classification_tool_competition/streamlit_app.py:/app/streamlit_app.py
networks:
- hopcroft-net
depends_on:
hopcroft-api:
condition: service_healthy
restart: unless-stopped
networks:
hopcroft-net:
driver: bridge
volumes:
hopcroft-logs:
driver: local