| # Docker Compose configuration for local development | |
| # Usage: docker-compose up --build | |
| version: '3.8' | |
| services: | |
| hitl-kg: | |
| build: | |
| context: . | |
| dockerfile: Dockerfile | |
| container_name: hitl-kg-medical | |
| ports: | |
| - "7860:7860" | |
| environment: | |
| - OPENAI_API_KEY=${OPENAI_API_KEY:-} | |
| - HF_TOKEN=${HF_TOKEN:-} | |
| - PORT=7860 | |
| volumes: | |
| # Mount source code for development (optional) | |
| # Uncomment for live reload during development | |
| # - ./app.py:/app/app.py | |
| # - ./src:/app/src | |
| restart: unless-stopped | |
| healthcheck: | |
| test: ["CMD", "curl", "-f", "http://localhost:7860/"] | |
| interval: 30s | |
| timeout: 10s | |
| retries: 3 | |
| start_period: 10s | |
| # Development with hot reload | |
| # Uncomment this service for development mode | |
| # hitl-kg-dev: | |
| # build: | |
| # context: . | |
| # dockerfile: Dockerfile | |
| # container_name: hitl-kg-dev | |
| # ports: | |
| # - "7860:7860" | |
| # environment: | |
| # - OPENAI_API_KEY=${OPENAI_API_KEY:-} | |
| # - DEBUG=true | |
| # volumes: | |
| # - .:/app | |
| # command: python app.py | |