| version: "3.8" | |
| services: | |
| voice-ai-assistant: | |
| build: . | |
| container_name: voice-ai-assistant | |
| ports: | |
| - "7860:7860" | |
| environment: | |
| - FLASK_ENV=production | |
| - PYTHONUNBUFFERED=1 | |
| volumes: | |
| - ./cache:/tmp/huggingface_cache | |
| - ./torch_cache:/tmp/torch_cache | |
| healthcheck: | |
| test: ["CMD", "curl", "-f", "http://localhost:7860/health"] | |
| interval: 30s | |
| timeout: 10s | |
| retries: 3 | |
| start_period: 120s | |
| restart: unless-stopped | |
| # ÁP DỤNG THỰC SỰ | |
| mem_limit: 2g | |
| cpus: 1.0 | |
| logging: | |
| driver: "json-file" | |
| options: | |
| max-size: "10m" | |
| max-file: "3" | |
| nginx: | |
| image: nginx:alpine | |
| container_name: voice-ai-nginx | |
| ports: | |
| - "80:80" | |
| - "443:443" | |
| volumes: | |
| - ./nginx.conf:/etc/nginx/nginx.conf:ro | |
| - ./ssl:/etc/nginx/ssl:ro | |
| depends_on: | |
| voice-ai-assistant: | |
| condition: service_healthy | |
| restart: unless-stopped | |
| volumes: | |
| cache: | |
| torch_cache: | |