vuvanhung commited on
Commit
1048038
·
verified ·
1 Parent(s): efec570

Create docker-compose.yml

Browse files
Files changed (1) hide show
  1. docker-compose.yml +49 -0
docker-compose.yml ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ version: "3.8"
2
+
3
+ services:
4
+ voice-ai-assistant:
5
+ build: .
6
+ container_name: voice-ai-assistant
7
+ ports:
8
+ - "7860:7860"
9
+ environment:
10
+ - FLASK_ENV=production
11
+ - PYTHONUNBUFFERED=1
12
+ volumes:
13
+ - ./cache:/tmp/huggingface_cache
14
+ - ./torch_cache:/tmp/torch_cache
15
+ healthcheck:
16
+ test: ["CMD", "curl", "-f", "http://localhost:7860/health"]
17
+ interval: 30s
18
+ timeout: 10s
19
+ retries: 3
20
+ start_period: 120s
21
+ restart: unless-stopped
22
+
23
+ # ÁP DỤNG THỰC SỰ
24
+ mem_limit: 2g
25
+ cpus: 1.0
26
+
27
+ logging:
28
+ driver: "json-file"
29
+ options:
30
+ max-size: "10m"
31
+ max-file: "3"
32
+
33
+ nginx:
34
+ image: nginx:alpine
35
+ container_name: voice-ai-nginx
36
+ ports:
37
+ - "80:80"
38
+ - "443:443"
39
+ volumes:
40
+ - ./nginx.conf:/etc/nginx/nginx.conf:ro
41
+ - ./ssl:/etc/nginx/ssl:ro
42
+ depends_on:
43
+ voice-ai-assistant:
44
+ condition: service_healthy
45
+ restart: unless-stopped
46
+
47
+ volumes:
48
+ cache:
49
+ torch_cache: