| version: '3.8' | |
| services: | |
| api: | |
| build: . | |
| container_name: kes-hack-backend | |
| ports: | |
| - "7860:7860" | |
| environment: | |
| - API_HOST=0.0.0.0 | |
| - API_PORT=7860 | |
| - DEBUG=False | |
| - DEVICE=cpu | |
| - LOG_LEVEL=INFO | |
| - PYTHONUNBUFFERED=1 | |
| env_file: | |
| - .env | |
| volumes: | |
| - ./src:/app/src | |
| restart: unless-stopped | |
| healthcheck: | |
| test: ["CMD", "python", "-c", "import requests; requests.get('http://localhost:7860/health', timeout=5)"] | |
| interval: 30s | |
| timeout: 10s | |
| retries: 3 | |
| start_period: 40s | |