-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
436 lines (399 loc) · 11.8 KB
/
docker-compose.yaml
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
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
version: "3.8"
##################################################
# Extensions
##################################################
x-backend: &x-backend
build:
dockerfile: ./backend/dev.Dockerfile
context: .
volumes:
- ./backend:/app
x-huishoudboekjeservice: &x-huishoudboekjeservice
build:
dockerfile: ./huishoudboekje_service/dev.Dockerfile
context: ./services
volumes:
- ./services/huishoudboekje_service:/app
- ./services/core_service/core_service:/app/core_service
environment:
DATABASE_URL: "postgresql://hhb:hhb@db/huishoudboekjeservice"
x-organisatieservice: &x-organisatieservice
build:
dockerfile: ./organisatie_service/dev.Dockerfile
context: ./services
volumes:
- ./services/organisatie_service:/app
- ./services/core_service/core_service:/app/core_service
environment:
DATABASE_URL: "postgresql://hhb:hhb@db/organisatieservice"
x-grootboekservice: &x-grootboekservice
build:
dockerfile: ./grootboek_service/dev.Dockerfile
context: ./services
volumes:
- ./services/grootboek_service:/app
- ./services/core_service/core_service:/app/core_service
environment:
DATABASE_URL: "postgresql://hhb:hhb@db/grootboekservice"
x-postadressenservice: &x-postadressenservice
build:
context: ./services/postadressenservice
dockerfile: ./dev.Dockerfile
volumes:
- ./services/postadressenservice:/app
environment:
DATABASE_URL: "postgresql://hhb:hhb@db/postadressenservice"
x-rapportageservice: &x-rapportageservice
build:
dockerfile: ./rapportage_service/dev.Dockerfile
context: ./services
volumes:
- ./services/rapportage_service:/app
- ./services/core_service/core_service:/app/core_service
x-py-tests: &x-py-tests
profiles:
- tests
command:
- /bin/sh
- -c
- pytest tests --disable-pytest-warnings
environment:
JWT_AUDIENCE: pytest
JWT_ISSUER: pytest
JWT_ALGORITHMS: HS256
JWT_SECRET: pytestsecret
x-js-tests: &x-js-tests
profiles:
- tests
entrypoint:
- /bin/sh
- -c
- npm test
services:
db:
container_name: database
image: postgres:13-alpine
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
PGDATA: /data/postgres
ports:
- 5432:5432
command: [ "postgres", "-c", "log_statement=all" ]
restart: unless-stopped
volumes:
- ./docker-compose/database:/docker-entrypoint-initdb.d
healthcheck:
test: pg_isready -U postgres -d alarmenservice
interval: 30s
timeout: 5s
retries: 5
rabbitmq:
image: rabbitmq:3.12-rc-management-alpine
container_name: rabbitmq
ports:
- 5672:5672
- 15672:15672
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:15672"]
interval: 30s
timeout: 10s
retries: 5
graphql-mesh:
build:
context: ./mesh
dockerfile: ./dev.Dockerfile
container_name: graphql-mesh
ports:
- 4000:4000
depends_on:
db:
condition: service_healthy
environment:
LOG_LEVEL: DEBUG
env_file:
- ./docker-compose/mesh/docker-csharp-urls.env
##################################################
# Databse Mesh For Testing
##################################################
database-mesh:
build:
context: ./database-mesh
dockerfile: ./dev.Dockerfile
ports:
- 4200:4000
depends_on:
db:
condition: service_healthy
##################################################
# Csharp services
##################################################
alarmenservice:
image: ${DOCKER_REGISTRY-}alarmservice
container_name: alarmenservice
build:
context: ./huishoudboekje_services
dockerfile: ./AlarmService.Application/dev.Dockerfile
volumes:
- ./huishoudboekje_services/:/src/app
- /src/app/AlarmService.Application/bin
- /src/app/AlarmService.Application/obj
environment:
ASPNETCORE_ENVIRONMENT: "Development"
HHB_DATABASE_URL: "Host=db;Database=alarmenservice;Port=5432;Username=postgres;Password=postgres"
LOG_LEVEL: DEBUG
ports:
- 8008:8000
- 8108:9000
depends_on:
db:
condition: service_healthy
banktransactieservice:
image: ${DOCKER_REGISTRY-}banktransactieservice
container_name: banktransactieservice
build:
context: ./huishoudboekje_services
dockerfile: ./BankServices.Application/dev.Dockerfile
volumes:
- ./huishoudboekje_services/:/src/app
- /src/app/BankServices.Application/bin
- /src/app/BankServices.Application/obj
environment:
ASPNETCORE_ENVIRONMENT: "Development"
DATABASE_URL: "Host=localhost;Database=banktransactieservice;Port=5432;Username=postgres;Password=postgres"
LOG_LEVEL: DEBUG
ports:
- 8003:8000
- 8103:9000
depends_on:
db:
condition: service_healthy
fileservice:
image: ${DOCKER_REGISTRY-}fileservice
container_name: fileservice
build:
context: ./huishoudboekje_services
dockerfile: ./FileServices.Application/dev.Dockerfile
volumes:
- ./huishoudboekje_services/:/src/app
- /src/app/FileServices.Application/bin
- /src/app/FileServices.Application/obj
environment:
ASPNETCORE_ENVIRONMENT: "Development"
DATABASE_URL: "Host=localhost;Database=fileservice;Port=5432;Username=postgres;Password=postgres"
LOG_LEVEL: DEBUG
ports:
- 8015:8000
- 8115:9000
depends_on:
db:
condition: service_healthy
logservice:
image: ${DOCKER_REGISTRY-}logservice
container_name: logservice
build:
context: ./huishoudboekje_services
dockerfile: ./LogService.Application/dev.Dockerfile
volumes:
- ./huishoudboekje_services/:/src/app
- /src/app/LogService.Application/bin
- /src/app/LogService.Application/obj
environment:
ASPNETCORE_ENVIRONMENT: "Development"
HHB_DATABASE_URL: "Host=db;Database=logservice;Port=5432;Username=postgres;Password=postgres"
LOG_LEVEL: DEBUG
ports:
- 8012:8000
- 8112:9000
depends_on:
db:
condition: service_healthy
notificationservice:
image: ${DOCKER_REGISTRY-}notificationservice
container_name: notificationservice
build:
context: ./huishoudboekje_services
dockerfile: ./NotificationService.Application/dev.Dockerfile
volumes:
- ./huishoudboekje_services/:/src/app
- /src/app/NotificationService.Application/bin
- /src/app/NotificationService.Application/obj
environment:
ASPNETCORE_ENVIRONMENT: "Development"
LOG_LEVEL: DEBUG
ports:
- 8013:8000
- 8113:9000
userapi:
image: ${DOCKER_REGISTRY-}userapi
container_name: userapi
build:
context: ./huishoudboekje_services
dockerfile: ./UserApi.Application/dev.Dockerfile
volumes:
- ./huishoudboekje_services/:/src/app
- /src/app/UserApi.Application/bin
- /src/app/UserApi.Application/obj
environment:
ASPNETCORE_ENVIRONMENT: "Development"
LOG_LEVEL: DEBUG
ports:
- 8014:8000
- 8114:9000
depends_on:
db:
condition: service_healthy
##################################################
# Auth ?
##################################################
authservice:
build:
dockerfile: ./dev.Dockerfile
context: ./services/authservice
container_name: authservice
volumes:
- ./services/authservice:/app
environment:
NODE_ENV: development
LOG_LEVEL: DEBUG
OIDC_ISSUER_URL: https://keycloak.huishoudboekje.demoground.nl/realms/huishoudboekje/
OIDC_CLIENT_ID: huishoudboekje-medewerkers
OIDC_CLIENT_SECRET: fc36d31f-f720-4914-a750-b83c7b0dd61c
OIDC_BASE_URL: http://localhost:3000
JWT_ISSUER: huishoudboekje-localhost
JWT_AUDIENCE: huishoudboekje-medewerkers
JWT_EXPIRES_IN: 30d
OIDC_SCOPES: null
JWT_SECRET: testtest
ports:
- 4000:8080
profiles:
- authservice
##################################################
# Extra Commands
##################################################
evaluate-alarms:
build:
context: ./rabbitmq-message-publisher
dockerfile: ./Dockerfile
environment:
EXCHANGE: check-alarms-timed
ROUTING_KEY: check-alarms-timed
MESSAGE: "{}"
profiles:
- evaluate-alarms
generate-payment-instructions:
build:
context: ./rabbitmq-message-publisher
dockerfile: ./Dockerfile
environment:
EXCHANGE: check-payment-instructions
ROUTING_KEY: check-payment-instructions
MESSAGE: "{}"
profiles:
- generate-payment-instructions
sampledata:
image: registry.gitlab.com/commonground/huishoudboekje/data-importer/data-importer:1.5.4
container_name: sampledata
environment:
GRAPHQL_API_URL: http://backend:8000/graphql
LOG_LEVEL: INFO
command: ["importer", "import"]
volumes:
- ./sampleData:/app/data
profiles:
- sampledata
##################################################
# To be replaced services
##################################################
backend:
<<: *x-backend
container_name: backend
environment:
PREFIX: /api
LOG_LEVEL: DEBUG
REQUIRE_AUTH: 0
JWT_AUDIENCE: Account
JWT_SECRET: testtest
JWT_ISSUER: localhost
JWT_ALGORITHMS: HS256
HHB_SERVICE_URL: "http://huishoudboekjeservice:8000"
ORGANISATIE_SERVICE_URL: "http://organisatieservice:8000"
TRANSACTIE_SERVICE_URL: "http://banktransactieservice:8000"
GROOTBOEK_SERVICE_URL: "http://grootboekservice:8000"
LOG_SERVICE_URL: "http://logservice:8000"
POSTADRESSENSERVICE_URL: "http://postadressenservice:8080"
ALARMENSERVICE_URL: "http://alarmenservice:8080"
SIGNALENSERVICE_URL: "http://signalenservice:8080"
USE_GRAPHIQL: 1
ALLOW_INTROSPECTION: 1
ports:
- 5000:8000
depends_on:
db:
condition: service_healthy
backend-test:
<<: [ *x-py-tests, *x-backend ]
huishoudboekjeservice:
<<: *x-huishoudboekjeservice
container_name: huishoudboekjeservice
environment:
DATABASE_URL: "postgresql://hhb:hhb@db/huishoudboekjeservice"
LOG_LEVEL: DEBUG
SEED_TESTDATA: "true"
ports:
- 8001:8000
depends_on:
db:
condition: service_healthy
huishoudboekjeservice-test:
<<: [ *x-py-tests, *x-huishoudboekjeservice ]
organisatieservice:
<<: *x-organisatieservice
container_name: organisatieservice
environment:
DATABASE_URL: "postgresql://hhb:hhb@db/organisatieservice"
LOG_LEVEL: DEBUG
SEED_TESTDATA: "true"
ports:
- 8002:8000
depends_on:
db:
condition: service_healthy
organisatieservice-test:
<<: [ *x-py-tests, *x-organisatieservice ]
grootboekservice:
<<: *x-grootboekservice
container_name: grootboekservice
environment:
DATABASE_URL: "postgresql://hhb:hhb@db/grootboekservice"
LOG_LEVEL: DEBUG
ports:
- 8004:8000
depends_on:
db:
condition: service_healthy
# Trail of history: port 8006 used to be in use by the contactcatalogus, but we deprecated this service in favor of the postadressenservice.
postadressenservice:
<<: *x-postadressenservice
container_name: postadressenservice
environment:
DATABASE_URL: "postgresql://hhb:hhb@db/postadressenservice?connect_timeout=300"
LOG_LEVEL: DEBUG
SEED_TESTDATA: "true"
ports:
- 8007:8080
depends_on:
db:
condition: service_healthy
postadressenservice-test:
<<: [ *x-js-tests, *x-postadressenservice ]
rapportageservice:
<<: *x-rapportageservice
container_name: rapportageservice
environment:
LOG_LEVEL: DEBUG
ports:
- 8011:8000
rapportageservice-test:
<<: [ *x-py-tests, *x-rapportageservice ]