Create docker-compose.yml
Browse files- docker-compose.yml +50 -0
docker-compose.yml
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version: '3.8'
|
| 2 |
+
|
| 3 |
+
services:
|
| 4 |
+
voice-ai-assistant:
|
| 5 |
+
build: .
|
| 6 |
+
ports:
|
| 7 |
+
- "7860:7860"
|
| 8 |
+
environment:
|
| 9 |
+
- PORT=7860
|
| 10 |
+
- FLASK_ENV=production
|
| 11 |
+
- HF_TOKEN=${HF_TOKEN}
|
| 12 |
+
- PYTHONUNBUFFERED=1
|
| 13 |
+
volumes:
|
| 14 |
+
- ./cache:/tmp/huggingface_cache
|
| 15 |
+
healthcheck:
|
| 16 |
+
test: ["CMD", "curl", "-f", "http://localhost:7860/health"]
|
| 17 |
+
interval: 30s
|
| 18 |
+
timeout: 10s
|
| 19 |
+
retries: 3
|
| 20 |
+
start_period: 2m
|
| 21 |
+
restart: unless-stopped
|
| 22 |
+
deploy:
|
| 23 |
+
resources:
|
| 24 |
+
limits:
|
| 25 |
+
memory: 2G
|
| 26 |
+
cpus: '1.0'
|
| 27 |
+
reservations:
|
| 28 |
+
memory: 1G
|
| 29 |
+
cpus: '0.5'
|
| 30 |
+
logging:
|
| 31 |
+
driver: "json-file"
|
| 32 |
+
options:
|
| 33 |
+
max-size: "10m"
|
| 34 |
+
max-file: "3"
|
| 35 |
+
|
| 36 |
+
nginx:
|
| 37 |
+
image: nginx:alpine
|
| 38 |
+
ports:
|
| 39 |
+
- "80:80"
|
| 40 |
+
- "443:443"
|
| 41 |
+
volumes:
|
| 42 |
+
- ./nginx.conf:/etc/nginx/nginx.conf
|
| 43 |
+
- ./ssl:/etc/nginx/ssl
|
| 44 |
+
depends_on:
|
| 45 |
+
- voice-ai-assistant
|
| 46 |
+
restart: unless-stopped
|
| 47 |
+
|
| 48 |
+
volumes:
|
| 49 |
+
cache:
|
| 50 |
+
driver: local
|