-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
281 lines (263 loc) · 6.69 KB
/
docker-compose.yml
File metadata and controls
281 lines (263 loc) · 6.69 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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
version: "3.9"
services:
postgres:
image: postgres:15-alpine
environment:
POSTGRES_DB: glocal_db
POSTGRES_USER: glocal_user
POSTGRES_PASSWORD: strongpass123
volumes:
- pg_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U glocal_user"]
interval: 10s
timeout: 5s
retries: 5
ports:
- "5432:5432"
redis:
image: redis:7-alpine
command: redis-server --appendonly yes
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
ports:
- "6379:6379"
rabbitmq:
image: rabbitmq:3.12-management
environment:
RABBITMQ_DEFAULT_USER: glocal
RABBITMQ_DEFAULT_PASS: glocalpass
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
interval: 10s
timeout: 5s
retries: 5
ports:
- "5672:5672"
- "15672:15672"
minio:
image: minio/minio:RELEASE.2024-01-25T01-54-28Z
environment:
MINIO_ROOT_USER: ${S3_ACCESS_KEY}
MINIO_ROOT_PASSWORD: ${S3_SECRET_KEY}
command: server /data --console-address ":9001"
volumes:
- minio_data:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/ready"]
interval: 10s
timeout: 5s
retries: 5
ports:
- "9000:9000"
- "9001:9001"
minio-create-bucket:
image: minio/mc:RELEASE.2024-01-25T00-17-18Z
depends_on:
minio:
condition: service_healthy
entrypoint: ["/bin/sh", "-c", "until /usr/bin/mc alias set local http://minio:9000 ${S3_ACCESS_KEY} ${S3_SECRET_KEY}; do sleep 2; done; /usr/bin/mc mb --ignore-existing local/${S3_BUCKET}; /usr/bin/mc anonymous set download local/${S3_BUCKET}"]
env_file: .env
restart: "no"
migrations:
image: postgres:15-alpine
depends_on:
postgres:
condition: service_healthy
volumes:
- ./migrations/sql:/migrations:ro
entrypoint: ["/bin/sh", "-c", "for f in /migrations/*.sql; do echo Running $f; PGPASSWORD=strongpass123 psql -h postgres -U glocal_user -d glocal_db -f $f; done"]
restart: "no"
api:
build:
context: .
dockerfile: infrastructure/docker/api.Dockerfile
env_file: .env
environment:
APP_ENV: dev
LOG_LEVEL: info
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
rabbitmq:
condition: service_healthy
minio:
condition: service_healthy
migrations:
condition: service_completed_successfully
ports:
- "8080:8080"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/healthz"]
interval: 10s
timeout: 5s
retries: 5
frontend:
build:
context: apps/frontend
dockerfile: ../infrastructure/docker/frontend.Dockerfile
environment:
NEXT_PUBLIC_API_URL: http://localhost:8080
NEXT_PUBLIC_MINIO_PUBLIC_URL: http://localhost:9000
depends_on:
api:
condition: service_healthy
ports:
- "3000:3000"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
interval: 10s
timeout: 5s
retries: 5
orchestrator:
build:
context: .
dockerfile: infrastructure/docker/python-service.Dockerfile
args:
SERVICE_NAME: orchestrator
env_file: .env
depends_on:
api:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "pgrep -f main.py > /dev/null"]
interval: 30s
timeout: 5s
retries: 5
restart: unless-stopped
asr-agent:
build:
context: .
dockerfile: infrastructure/docker/python-service.Dockerfile
args:
SERVICE_NAME: asr-agent
env_file: .env
depends_on:
api:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "pgrep -f main.py > /dev/null"]
interval: 30s
timeout: 5s
retries: 5
restart: unless-stopped
translate-agent:
build:
context: .
dockerfile: infrastructure/docker/python-service.Dockerfile
args:
SERVICE_NAME: translate-agent
env_file: .env
depends_on:
api:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "pgrep -f main.py > /dev/null"]
interval: 30s
timeout: 5s
retries: 5
restart: unless-stopped
tts-agent:
build:
context: .
dockerfile: infrastructure/docker/python-service.Dockerfile
args:
SERVICE_NAME: tts-agent
env_file: .env
depends_on:
api:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "pgrep -f main.py > /dev/null"]
interval: 30s
timeout: 5s
retries: 5
restart: unless-stopped
mix-agent:
build:
context: .
dockerfile: infrastructure/docker/python-service.Dockerfile
args:
SERVICE_NAME: mix-agent
env_file: .env
depends_on:
api:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "pgrep -f main.py > /dev/null"]
interval: 30s
timeout: 5s
retries: 5
restart: unless-stopped
subs-agent:
build:
context: .
dockerfile: infrastructure/docker/python-service.Dockerfile
args:
SERVICE_NAME: subs-agent
env_file: .env
depends_on:
api:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "pgrep -f main.py > /dev/null"]
interval: 30s
timeout: 5s
retries: 5
restart: unless-stopped
textinframe-agent:
build:
context: .
dockerfile: infrastructure/docker/python-service.Dockerfile
args:
SERVICE_NAME: textinframe-agent
env_file: .env
depends_on:
api:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "pgrep -f main.py > /dev/null"]
interval: 30s
timeout: 5s
retries: 5
restart: unless-stopped
qc-agent:
build:
context: .
dockerfile: infrastructure/docker/python-service.Dockerfile
args:
SERVICE_NAME: qc-agent
env_file: .env
depends_on:
api:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "pgrep -f main.py > /dev/null"]
interval: 30s
timeout: 5s
retries: 5
restart: unless-stopped
yt-uploader:
build:
context: .
dockerfile: infrastructure/docker/python-service.Dockerfile
args:
SERVICE_NAME: yt-uploader
env_file: .env
depends_on:
api:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "pgrep -f main.py > /dev/null"]
interval: 30s
timeout: 5s
retries: 5
restart: unless-stopped
volumes:
pg_data:
minio_data: