-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
386 lines (360 loc) · 9.11 KB
/
docker-compose.yml
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
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
services:
event-bus:
container_name: letsthink-event-bus
image: "rabbitmq:management"
ports:
- 5672:5672
- 15672:15672
expose:
- 5672
healthcheck:
test: rabbitmq-diagnostics check_port_connectivity
interval: 10s
timeout: 30s
retries: 10
# frontend:
# container_name: letsthink-frontend
# build: "./frontend"
# ports:
# - 3000:3000
# volumes:
# - "./frontend/public:/usr/app/public"
# - "./frontend/src:/usr/app/src"
# depends_on:
# event-bus:
# condition: service_healthy
rooms:
container_name: letsthink-rooms
build: "./rooms"
restart: always
ports:
- 4001:4001
volumes:
- "./rooms/src:/usr/app/src"
depends_on:
event-bus:
condition: service_healthy
rooms-db:
condition: service_healthy
environment:
- JWT_ACCESS_SECRET=${JWT_ACCESS_SECRET}
- ORIGIN=${ORIGIN}
- ROOMS_PG_PASSWORD=${ROOMS_PG_PASSWORD}
rooms-db:
container_name: letsthink-rooms-db
image: postgres:alpine
restart: always
ports:
- 5432:5432
environment:
- POSTGRES_PASSWORD=${ROOMS_PG_PASSWORD}
volumes:
- "./rooms/src/utils/init.sql:/docker-entrypoint-initdb.d/init.sql"
healthcheck:
test: pg_isready --username=postgres
interval: 25s
timeout: 30s
retries: 10
messages:
container_name: letsthink-messages
build: "./messages"
restart: always
ports:
- 4002:4002
volumes:
- "./messages/src:/usr/app/src"
depends_on:
event-bus:
condition: service_healthy
messages-db:
condition: service_healthy
environment:
- MESSAGES_PG_PASSWORD=${MESSAGES_PG_PASSWORD}
messages-db:
container_name: letsthink-messages-db
image: postgres:alpine
restart: always
ports:
- 5433:5432
environment:
- POSTGRES_PASSWORD=${MESSAGES_PG_PASSWORD}
volumes:
- "./messages/src/utils/init.sql:/docker-entrypoint-initdb.d/init.sql"
healthcheck:
test: pg_isready --username=postgres
interval: 25s
timeout: 30s
retries: 10
polls:
container_name: letsthink-polls
build: "./polls"
restart: always
ports:
- 4003:4003
volumes:
- "./polls/src:/usr/app/src"
depends_on:
event-bus:
condition: service_healthy
polls-db:
condition: service_healthy
environment:
- JWT_ACCESS_SECRET=${JWT_ACCESS_SECRET}
- ORIGIN=${ORIGIN}
- POLLS_PG_PASSWORD=${POLLS_PG_PASSWORD}
polls-db:
container_name: letsthink-polls-db
image: postgres:alpine
restart: always
ports:
- 5434:5432
environment:
- POSTGRES_PASSWORD=${POLLS_PG_PASSWORD}
volumes:
- "./polls/src/utils/init.sql:/docker-entrypoint-initdb.d/init.sql"
healthcheck:
test: pg_isready --username=postgres
interval: 25s
timeout: 30s
retries: 10
moderator:
container_name: letsthink-moderator
build: "./moderator"
restart: always
ports:
- 4004:4004
volumes:
- "./moderator/src:/usr/app/src"
depends_on:
event-bus:
condition: service_healthy
environment:
- MODERATOR_MONGO_USER=${MODERATOR_MONGO_USER}
- MODERATOR_MONGO_PASSWORD=${MODERATOR_MONGO_PASSWORD}
moderator-db:
container_name: letsthink-moderator-db
image: mongo:latest
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: rootpassword
ports:
- 27030:27017
email:
container_name: letsthink-email
build: "./email"
restart: always
ports:
- 4005:4005
volumes:
- "./email/src:/usr/app/src"
depends_on:
event-bus:
condition: service_healthy
environment:
- EMAIL_MONGO_USER=${EMAIL_MONGO_USER}
- EMAIL_MONGO_PASSWORD=${EMAIL_MONGO_PASSWORD}
- SIB_API_KEY=${SIB_API_KEY}
- SIB_SENDER_EMAIL=${SIB_SENDER_EMAIL}
- SIB_SENDER_NAME=${SIB_SENDER_NAME}
email-db:
container_name: letsthink-email-db
image: mongo:latest
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: rootpassword
ports:
- 27018:27017
users:
container_name: letsthink-users
build: "./users"
restart: always
ports:
- 4006:4006
volumes:
- "./users/src:/usr/app/src"
depends_on:
event-bus:
condition: service_healthy
users-db:
condition: service_healthy
environment:
- USERS_PG_PASSWORD=${USERS_PG_PASSWORD}
users-db:
container_name: letsthink-users-db
image: postgres:alpine
restart: always
ports:
- 5437:5432
environment:
- POSTGRES_PASSWORD=${USERS_PG_PASSWORD}
volumes:
- "./users/src/utils/init.sql:/docker-entrypoint-initdb.d/init.sql"
healthcheck:
test: pg_isready --username=postgres
interval: 25s
timeout: 30s
retries: 10
authenticator:
container_name: letsthink-authenticator
build: "./authenticator"
restart: always
ports:
- 4007:4007
volumes:
- "./authenticator/src:/usr/app/src"
depends_on:
event-bus:
condition: service_healthy
environment:
- JWT_ACCESS_SECRET=${JWT_ACCESS_SECRET}
- JWT_REFRESH_SECRET=${JWT_REFRESH_SECRET}
- ORIGIN=${ORIGIN}
- USERS_PG_PASSWORD=${USERS_PG_PASSWORD}
authenticator-cache:
container_name: letsthink-authenticator-cache
image: redis:alpine
restart: always
ports:
- 6397:6397
expiration:
container_name: letsthink-expiration
build: "./expiration"
restart: always
ports:
- 4008:4008
volumes:
- "./expiration/src:/usr/app/src"
depends_on:
event-bus:
condition: service_healthy
expiration-db:
condition: service_healthy
environment:
- EXPIRATION_REDIS_PASSWORD=${EXPIRATION_REDIS_PASSWORD}
expiration-db:
container_name: letsthink-expiration-db
image: redis:alpine
volumes:
- ./expiration/redis.conf:/usr/local/etc/redis/redis.conf
command: redis-server /usr/local/etc/redis/redis.conf --requirepass ${EXPIRATION_REDIS_PASSWORD}
restart: always
healthcheck:
test: redis-cli ping
interval: 25s
timeout: 30s
retries: 10
site-health:
container_name: letsthink-site-health
build: "./site-health"
restart: always
ports:
- 4009:4009
volumes:
- "./site-health/src:/usr/app/src"
depends_on:
event-bus:
condition: service_healthy
environment:
- SH_MONGO_USER=${SH_MONGO_USER}
- SH_MONGO_PASSWORD=${SH_MONGO_PASSWORD}
site-health-db:
container_name: letsthink-site-health-db
image: mongo:latest
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: rootpassword
ports:
- 27017:27017
visualizer:
container_name: letsthink-visualizer
build: "./visualizer"
restart: always
ports:
- 4013:4013
volumes:
- "./visualizer/src:/usr/app/src"
depends_on:
event-bus:
condition: service_healthy
environment:
- SH_MONGO_USER=${SH_MONGO_USER}
- SH_MONGO_PASSWORD=${SH_MONGO_PASSWORD}
visualizer-db:
container_name: letsthink-visualizer-db
image: mongo:latest
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: rootpassword
ports:
- 27020:27017
visual-generator:
container_name: letsthink-visual-generator
build: "./visual-generator"
restart: always
ports:
- 4010:4010
volumes:
- "./visual-generator/src:/usr/app/src"
depends_on:
event-bus:
condition: service_healthy
environment:
- AWS_S3_ACCESS_KEY_ID=${AWS_S3_ACCESS_KEY_ID}
- AWS_S3_SECRET_ACCESS_KEY=${AWS_S3_SECRET_ACCESS_KEY}
query:
container_name: letsthink-query
build: "./query"
restart: always
ports:
- 4011:4011
volumes:
- "./query/src:/usr/app/src"
depends_on:
event-bus:
condition: service_healthy
environment:
- SH_MONGO_USER=${SH_MONGO_USER}
- SH_MONGO_PASSWORD=${SH_MONGO_PASSWORD}
- ORIGIN=${ORIGIN}
query-db:
container_name: letsthink-query-db
image: mongo:latest
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: rootpassword
ports:
- 27019:27017
vote:
container_name: letsthink-vote
build: "./vote"
restart: always
ports:
- 4012:4012
volumes:
- "./vote/src:/usr/app/src"
depends_on:
event-bus:
condition: service_healthy
vote-db:
condition: service_healthy
environment:
- VOTE_PG_PASSWORD=${VOTE_PG_PASSWORD}
vote-db:
container_name: letsthink-vote-db
image: postgres:alpine
restart: always
environment:
- POSTGRES_PASSWORD=${VOTE_PG_PASSWORD}
ports:
- 5439:5432
volumes:
- "./vote/src/utils/init.sql:/docker-entrypoint-initdb.d/init.sql"
healthcheck:
test: pg_isready --username=postgres
interval: 25s
timeout: 30s
retries: 10