-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
180 lines (152 loc) · 3.78 KB
/
Copy pathdocker-compose.yml
File metadata and controls
180 lines (152 loc) · 3.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
version: '3.8'
# ====================================
# Whisper-Insights - Docker Compose
# ====================================
services:
# ====================================
# Aplicação Principal
# ====================================
whisper-insights:
build:
context: .
dockerfile: Dockerfile
args:
- DEBIAN_FRONTEND=noninteractive
image: whisper-insights:latest
container_name: whisper-insights-app
restart: unless-stopped
# Configuração de rede
ports:
- "5001:5001"
# Variáveis de ambiente
environment:
- FLASK_ENV=production
- FLASK_DEBUG=0
- PYTHONUNBUFFERED=1
- TZ=America/Sao_Paulo
# Arquivo de environment
env_file:
- .env
# Volumes persistentes
volumes:
- ./uploads:/app/uploads
- ./logs:/app/logs
- whisper_models:/root/.cache/whisper
- huggingface_cache:/root/.cache/huggingface
# Configuração de recursos
deploy:
resources:
limits:
memory: 4G
cpus: '2.0'
reservations:
memory: 1G
cpus: '1.0'
# Health check
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5001/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
# Dependências
# depends_on:
# - ollama
# Configuração de logging
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "5"
# ====================================
# Ollama (IA Local) - Opcional
# ====================================
ollama:
image: ollama/ollama:latest
container_name: whisper-insights-ollama
restart: unless-stopped
# Configuração de rede
ports:
- "11434:11434"
# Variáveis de ambiente
environment:
- OLLAMA_HOST=0.0.0.0
# Volumes para modelos
volumes:
- ollama_data:/root/.ollama
# GPU support (opcional - descomente se tiver GPU)
# runtime: nvidia
# environment:
# - NVIDIA_VISIBLE_DEVICES=all
# - NVIDIA_DRIVER_CAPABILITIES=compute,utility
# Configuração de recursos
deploy:
resources:
limits:
memory: 8G
cpus: '4.0'
reservations:
memory: 2G
cpus: '1.0'
# Health check
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:11434/api/tags"]
interval: 30s
timeout: 10s
retries: 3
start_period: 120s
# Configuração de logging
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "3"
# ====================================
# Nginx (Reverse Proxy) - Opcional
# ====================================
nginx:
image: nginx:alpine
container_name: whisper-insights-nginx
restart: unless-stopped
# Configuração de rede
ports:
- "80:80"
- "443:443"
# Volumes de configuração
volumes:
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./docker/nginx/ssl:/etc/nginx/ssl:ro
# Dependências
depends_on:
- whisper-insights
# Configuração de logging
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "3"
# Configuração condicional (desabilitado por padrão)
profiles:
- production
# ====================================
# Volumes Nomeados
# ====================================
volumes:
# Cache de modelos Whisper
whisper_models:
driver: local
# Cache Hugging Face (para diarização)
huggingface_cache:
driver: local
# Dados do Ollama
ollama_data:
driver: local
# ====================================
# Redes
# ====================================
networks:
default:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16