-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.test.yml
348 lines (325 loc) Β· 9.24 KB
/
docker-compose.test.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
version: "3.4"
services:
### CLIENT ###
client-node:
build:
context: ./app/client
dockerfile: ../../deploy/docker/Dockerfile
target: test
args:
- SERVICE_NAME=client
hostname: client
container_name: client
command: sh -c "yarn install && npx playwright install-deps chromium && yarn test"
env_file:
- .env.dev
volumes:
- ./app/client:/usr/src/client
stdin_open: true
tty: true
ports:
- ${VITE_CLIENT_PORT}:${VITE_CLIENT_PORT}
### FRONTEND GATEWAY ###
gateway-node:
build:
context: ./server/gateway
dockerfile: ../../deploy/docker/Dockerfile
target: test
args:
- SERVICE_NAME=gateway
hostname: gateway
command: sh -c "yarn install && yarn test"
env_file:
- .env.dev
volumes:
- ./server/gateway:/usr/src/gateway
ports:
- ${API_GATEWAY_PORT}:${API_GATEWAY_PORT}
networks:
- backend-dev
- frontend-dev
### CARD SERVICE ###
card-service-node:
build:
context: ./server/card-service
dockerfile: ../../deploy/docker/Dockerfile
target: test
args:
- SERVICE_NAME=card-service
hostname: card-service-node
command: sh -c "yarn install && yarn typeorm:migrate && yarn test"
networks:
- backend-dev
env_file:
- .env.dev
depends_on:
- card-service-postgres
volumes:
- ./server/card-service:/usr/src/card-service
links:
- card-service-postgres
card-service-postgres:
image: postgres:13.2-alpine
hostname: card-service-postgres
networks:
- backend-dev
env_file:
- .env.dev
environment:
- POSTGRES_USER=${CARD_SERVICE_POSTGRES_USER}
- POSTGRES_PASSWORD=${CARD_SERVICE_POSTGRES_PASSWORD}
- POSTGRES_DB=${CARD_SERVICE_POSTGRES_DB}
volumes:
- card-service-postgres-dev:/var/lib/postgresql/data
### USER SERVICE ###
user-service-node:
build:
context: ./server/user-service
dockerfile: ../../deploy/docker/Dockerfile
target: test
args:
- SERVICE_NAME=user-service
hostname: user-service-node
container_name: user-service-node
command: sh -c "yarn install && yarn typeorm:migrate && yarn test"
networks:
- backend-dev
env_file:
- .env.dev
depends_on:
- user-service-postgres
volumes:
- ./server/user-service:/usr/src/user-service
links:
- user-service-postgres
user-service-postgres:
image: postgres:13.2-alpine
hostname: user-service-postgres
networks:
- backend-dev
env_file:
- .env.dev
environment:
- POSTGRES_USER=${USER_SERVICE_POSTGRES_USER}
- POSTGRES_PASSWORD=${USER_SERVICE_POSTGRES_PASSWORD}
- POSTGRES_DB=${USER_SERVICE_POSTGRES_DB}
volumes:
- user-service-postgres-dev:/var/lib/postgresql/data
### PAYMENT SERVICE ###
payment-service-node:
build:
context: ./server/payment-service
dockerfile: ../../deploy/docker/Dockerfile
target: test
args:
- SERVICE_NAME=payment-service
hostname: payment-service-node
command: sh -c "yarn install && yarn typeorm:migrate && yarn test"
networks:
- backend-dev
env_file:
- .env.dev
depends_on:
- payment-service-postgres
volumes:
- ./server/payment-service:/usr/src/payment-service
links:
- payment-service-postgres
payment-service-postgres:
image: postgres:13.2-alpine
hostname: payment-service-postgres
networks:
- backend-dev
env_file:
- .env.dev
environment:
- POSTGRES_USER=${PAYMENT_SERVICE_POSTGRES_USER}
- POSTGRES_PASSWORD=${PAYMENT_SERVICE_POSTGRES_PASSWORD}
- POSTGRES_DB=${PAYMENT_SERVICE_POSTGRES_DB}
volumes:
- payment-service-postgres-dev:/var/lib/postgresql/data
### AUTH SERVICE ###
auth-service-node:
build:
context: ./server/auth-service
dockerfile: ../../deploy/docker/Dockerfile
target: test
args:
- SERVICE_NAME=auth-service
hostname: auth-service-node
command: sh -c "yarn install && yarn typeorm:migrate && yarn test"
networks:
- backend-dev
env_file:
- .env.dev
depends_on:
- auth-service-postgres
volumes:
- ./server/auth-service:/usr/src/auth-service
links:
- auth-service-postgres
auth-service-postgres:
image: postgres:13.2-alpine
hostname: auth-service-postgres
networks:
- backend-dev
env_file:
- .env.dev
environment:
- POSTGRES_USER=${AUTH_SERVICE_POSTGRES_USER}
- POSTGRES_PASSWORD=${AUTH_SERVICE_POSTGRES_PASSWORD}
- POSTGRES_DB=${AUTH_SERVICE_POSTGRES_DB}
volumes:
- auth-service-postgres-dev:/var/lib/postgresql/data
### USER DECK SERVICE ###
user-deck-service-node:
build:
context: ./server/user-deck-service
dockerfile: ../../deploy/docker/Dockerfile
target: test
args:
- SERVICE_NAME=user-deck-service
hostname: user-deck-service-node
command: sh -c "yarn install && yarn typeorm:migrate && yarn test"
networks:
- backend-dev
env_file:
- .env.dev
depends_on:
- user-deck-service-postgres
volumes:
- ./server/user-deck-service:/usr/src/user-deck-service
links:
- user-deck-service-postgres
user-deck-service-postgres:
image: postgres:13.2-alpine
hostname: user-deck-service-postgres
networks:
- backend-dev
env_file:
- .env.dev
environment:
- POSTGRES_USER=${USER_DECK_SERVICE_POSTGRES_USER}
- POSTGRES_PASSWORD=${USER_DECK_SERVICE_POSTGRES_PASSWORD}
- POSTGRES_DB=${USER_DECK_SERVICE_POSTGRES_DB}
volumes:
- user-deck-service-postgres-dev:/var/lib/postgresql/data
### PROMO SERVICE ###
promo-service-node:
build:
context: ./server/promo-service
dockerfile: ../../deploy/docker/Dockerfile
target: test
args:
- SERVICE_NAME=promo-service
hostname: promo-service-node
command: >
sh -c "yarn install &&
yarn typeorm:migrate &&
yarn test"
networks:
- backend-dev
env_file:
- .env.dev
depends_on:
- promo-service-postgres
volumes:
- ./server/promo-service:/usr/src/promo-service
links:
- promo-service-postgres
promo-service-postgres:
image: postgres:13.2-alpine
hostname: promo-service-postgres
networks:
- backend-dev
env_file:
- .env.dev
environment:
- POSTGRES_USER=${PROMO_SERVICE_POSTGRES_USER}
- POSTGRES_PASSWORD=${PROMO_SERVICE_POSTGRES_PASSWORD}
- POSTGRES_DB=${PROMO_SERVICE_POSTGRES_DB}
volumes:
- promo-service-postgres-dev:/var/lib/postgresql/data
### DUEL SERVICE ###
duel-service-node:
build:
context: ./server/duel-service
dockerfile: ../../deploy/docker/Dockerfile
target: test
args:
- SERVICE_NAME=duel-service
hostname: duel-service-node
command: >
sh -c "yarn install &&
yarn typeorm:migrate &&
yarn test"
networks:
- backend-dev
env_file:
- .env.dev
depends_on:
- duel-service-postgres
volumes:
- ./server/duel-service:/usr/src/duel-service
links:
- duel-service-postgres
duel-service-postgres:
image: postgres:13.2-alpine
hostname: duel-service-postgres
networks:
- backend-dev
env_file:
- .env.dev
environment:
- POSTGRES_USER=${DUEL_SERVICE_POSTGRES_USER}
- POSTGRES_PASSWORD=${DUEL_SERVICE_POSTGRES_PASSWORD}
- POSTGRES_DB=${DUEL_SERVICE_POSTGRES_DB}
volumes:
- duel-service-postgres-dev:/var/lib/postgresql/data
### MAILER SERVICE ###
mailer-service-node:
build:
context: ./server/mailer-service
dockerfile: ../../deploy/docker/Dockerfile
target: test
hostname: mailer-service-node
command: sh -c "yarn install && yarn typeorm:migrate && yarn test"
networks:
- backend-dev
env_file:
- .env.dev
depends_on:
- mailcatcher
volumes:
- ./server/mailer-service:/usr/src/app
links:
- mailcatcher
### ADMINER ###
adminer:
image: adminer:4.8.1
hostname: adminer
networks:
- backend-dev
ports:
- "9000:8080"
### MAILCATCHER ###
mailcatcher:
image: jderusse/mailcatcher:latest
hostname: mailcatcher
networks:
- backend-dev
ports:
- "9025:80"
networks:
backend-dev:
driver: bridge
frontend-dev:
driver: bridge
volumes:
card-service-postgres-dev:
user-service-postgres-dev:
payment-service-postgres-dev:
auth-service-postgres-dev:
user-deck-service-postgres-dev:
promo-service-postgres-dev:
duel-service-postgres-dev: