Spaces:
Runtime error
Runtime error
| version: '3.8' | |
| services: | |
| ai-service: | |
| build: | |
| context: . | |
| dockerfile: Dockerfile | |
| container_name: faceid-ai-service | |
| ports: | |
| - "8000:7860" # Áp dụng port 8000 ở host ánh xạ vào port 7860 của container để test local bình thường | |
| env_file: | |
| - .env # Load các biến môi trường cấu hình thực tế từ file .env cục bộ | |
| environment: | |
| - PORT=7860 | |
| - HOST=0.0.0.0 | |
| restart: unless-stopped | |
| healthcheck: | |
| # Sử dụng python3 có sẵn trong container để test healthcheck thay vì dùng curl/wget (thường không có sẵn trong ảnh slim) | |
| test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:7860/api/health')"] | |
| interval: 30s | |
| timeout: 10s | |
| retries: 3 | |
| start_period: 15s | |