-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
506 lines (488 loc) · 14.9 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
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
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
# vim: set syntax=yaml:
version: '3.6'
networks:
internal_network: {}
volumes:
postgres_data: {}
elasticsearch_data: {}
elasticsearch_snapshots: {}
files_assets: {}
files_contracts: {}
files_drafts: {}
files_users: {}
files_temp: {}
ingest_input: {}
profile_input: {}
profile_temp: {}
profile_output: {}
services:
'postgres':
image: postgis/postgis:10-3.0-alpine
networks:
internal_network:
aliases:
- 'postgres-1'
volumes:
- type: volume
source: postgres_data
target: /var/lib/postgresql/data
- type: bind
source: ./secrets/postgres/
target: /secrets/
read_only: true
- type: bind
source: ./files/postgres/db-init-scripts/
target: /docker-entrypoint-initdb.d
read_only: true
environment:
POSTGRES_PASSWORD_FILE: /secrets/postgres-password
ports: ['127.0.0.1:30500:5432']
'flyway':
image: flyway/flyway:7.7
command: ['info']
depends_on:
- 'postgres'
networks:
internal_network: {}
volumes:
- type: bind
source: ./secrets/flyway/secret.conf
target: /flyway/conf/secret.conf
read_only: true
- type: bind
source: ./cli/src/main/resources/db/migration
target: /flyway/sql
read_only: true
environment:
FLYWAY_CONFIG_FILES: /flyway/conf/secret.conf
FLYWAY_USER: opertusmundi
FLYWAY_URL: jdbc:postgresql://postgres-1:5432/opertusmundi?
FLYWAY_SCHEMAS: public,web
FLYWAY_DEFAULT_SCHEMA: public
FLYWAY_BASELINE_VERSION: "1_0_0"
FLYWAY_BASELINE_ON_MIGRATE: 'true'
'messenger_flyway':
image: flyway/flyway:7.7
command: ['info']
depends_on:
- 'postgres'
networks:
internal_network: {}
volumes:
- type: bind
source: ./secrets/flyway/secret.conf
target: /flyway/conf/secret.conf
read_only: true
- type: bind
source: ./message-service/src/main/resources/db/migration
target: /flyway/sql
read_only: true
environment:
FLYWAY_TABLE: _schema_version
FLYWAY_CONFIG_FILES: /flyway/conf/secret.conf
FLYWAY_USER: opertusmundi
FLYWAY_URL: jdbc:postgresql://postgres-1:5432/opertusmundi?
FLYWAY_SCHEMAS: messaging
FLYWAY_DEFAULT_SCHEMA: messaging
FLYWAY_BASELINE_VERSION: "1_0_0"
FLYWAY_BASELINE_ON_MIGRATE: 'true'
'elasticsearch':
image: docker.elastic.co/elasticsearch/elasticsearch:7.12.0
networks:
internal_network: {}
environment:
ES_JAVA_OPTS: >-
-Xms1024m -Xmx1024m
"cluster.name": opertusmundi
"discovery.type": single-node
"bootstrap.memory_lock": "false"
"path.repo": /snapshots
ulimits:
memlock:
soft: -1
hard: -1
nproc: 65535
nofile:
soft: 20000
hard: 65535
volumes:
- type: volume
source: elasticsearch_data
target: /usr/share/elasticsearch/data
- type: volume
source: elasticsearch_snapshots
target: /snapshots
ports: ['127.0.0.1:30200:9200']
'catalogueapi':
image: opertusmundi/catalogueapi:0.0.3
depends_on:
- 'postgres'
networks:
internal_network: {}
volumes:
- type: bind
source: ./logs/catalogueapi
target: /var/local/catalogueapi/logs
- type: bind
source: ./secrets/key
target: /var/local/catalogueapi/secret_key
read_only: true
- type: bind
source: ./secrets/postgres/opertusmundi-password
target: /secrets/database-password
read_only: true
environment:
SERVER_NAME: ""
DATABASE_URL: postgresql://postgres-1:5432/catalogueapi
DATABASE_USERNAME: opertusmundi
DATABASE_PASSWORD_FILE: /secrets/database-password
SQLALCHEMY_TRACK_MODIFICATIONS: "False"
DATABASE_INITIALIZE_SCHEMA: "True"
ERROR_404_HELP: "False"
RESTX_MASK_SWAGGER: "False"
RESTX_VALIDATE: "True"
SWAGGER_UI_DOC_EXPANSION: "list"
FLASK_ENV: production
FLASK_DEBUG: "False"
TZ: Europe/Athens
ports: ['127.0.0.1:30505:5000']
'bpm_engine':
image: opertusmundi/bpm-engine:1.0.0
depends_on:
- 'postgres'
networks:
internal_network:
aliases:
- 'bpm-server'
volumes:
- type: bind
source: ./secrets/postgres/opertusmundi-password
target: /secrets/database-password
read_only: true
- type: bind
source: ./secrets/camunda/
target: /secrets/camunda/
read_only: true
- type: bind
source: ./logs/bpm-engine/
target: /app/logs
environment:
JAVA_OPTS: >-
-server -Xmx768m -Xms128m -Djava.security.egd=file:///dev/urandom
DATABASE_URL: jdbc:postgresql://postgres-1:5432/camunda
DATABASE_USERNAME: opertusmundi
DATABASE_PASSWORD_FILE: /secrets/database-password
CAMUNDA_ADMIN_USERNAME: admin
CAMUNDA_ADMIN_PASSWORD_FILE: /secrets/camunda/admin-password
ports: ['127.0.0.1:31080:8000']
'bpm_worker':
image: opertusmundi/bpm-worker:1.0.0
depends_on:
- 'postgres'
- 'bpm_engine'
networks:
internal_network:
aliases:
- 'bpm-worker'
volumes:
- type: bind
source: ./secrets/postgres/opertusmundi-password
target: /secrets/database-password
read_only: true
- type: bind
source: ./secrets/mangopay-client-password
target: /secrets/mangopay-client-password
read_only: true
- type: bind
source: ./secrets/jwt-secret
target: /secrets/jwt-secret
read_only: true
- type: bind
source: ./secrets/camunda/
target: /secrets/camunda/
read_only: true
- type: bind
source: ./logs/bpm-worker
target: /app/logs
- type: volume
source: files_assets
target: /var/local/opertusmundi/files/assets
- type: volume
source: files_contracts
target: /var/local/opertusmundi/files/contracts
- type: volume
source: files_drafts
target: /var/local/opertusmundi/files/drafts
- type: volume
source: files_users
target: /var/local/opertusmundi/files/users
- type: volume
source: files_temp
target: /var/local/opertusmundi/files/temp
- type: volume
source: ingest_input
target: /var/local/opertusmundi/ingest/input
- type: volume
source: profile_input
target: /var/local/opertusmundi/profile/input
environment:
JAVA_OPTS: >-
-server -Xmx512m -Xms128m -Djava.security.egd=file:///dev/urandom
MARKETPLACE_URL: ${MARKETPLACE_URL}
DATABASE_URL: jdbc:postgresql://postgres-1:5432/opertusmundi
DATABASE_USERNAME: opertusmundi
DATABASE_PASSWORD_FILE: /secrets/database-password
JWT_SECRET_FILE: /secrets/jwt-secret
BPM_REST_BASE_URL: http://bpm-server:8000/engine-rest
BPM_REST_USERNAME: admin
BPM_REST_PASSWORD_FILE: /secrets/camunda/admin-password
MANGOPAY_BASE_URL: https://api.sandbox.mangopay.com
MANGOPAY_CLIENT_ID: ${MANGOPAY_CLIENT_ID}
MANGOPAY_CLIENT_PASSWORD_FILE: /secrets/mangopay-client-password
RATING_BASE_URL: ""
RATING_USERNAME: ""
RATING_PASSWORD_FILE: ""
MAILER_BASE_URL: http://mailer:8105/
CATALOGUE_BASE_URL: http://catalogueapi:5000/
INGEST_BASE_URL: http://ingest:5000/
MESSENGER_BASE_URL: http://messenger:8110/
PID_BASE_URL: http://pid:5000/
PROFILE_BASE_URL: http://profile:5000/
ELASTICSEARCH_BASE_URL: http://elasticsearch:9200
deploy:
replicas: 2
'profile':
image: opertusmundi/profile:1.0.0
depends_on:
- 'postgres'
networks:
internal_network: {}
volumes:
- type: bind
source: ./logs/profile
target: /var/local/geoprofile/logs
- type: volume
source: profile_input
target: /var/local/geoprofile/input
read_only: true
- type: volume
source: profile_output
target: /var/local/geoprofile/output
- type: volume
source: profile_temp
target: /var/local/geoprofile/temp
- type: bind
source: ./secrets/postgres/opertusmundi-password
target: /secrets/database-password
read_only: true
- type: bind
source: ./secrets/key
target: /secrets/secret_key
read_only: true
environment:
INPUT_DIR: /var/local/geoprofile/input
OUTPUT_DIR: /var/local/geoprofile/output
TEMPDIR: /var/local/geoprofile/temp
FLASK_ENV: production
FLASK_DEBUG: "False"
CORS: "*"
PYTHONUNBUFFERED: "1"
DB_ENGINE: postgresql
DB_HOST: postgres-1
DB_PORT: '5432'
DB_USER: opertusmundi
DB_NAME: profile
DB_PASS_FILE: /secrets/database-password
ports: ['127.0.0.1:30515:5000']
'pid':
image: opertusmundi/pid:0.1.0
depends_on:
- 'postgres'
networks:
internal_network: {}
volumes:
- type: bind
source: ./secrets/postgres/opertusmundi-password
target: /secrets/database-password
read_only: true
environment:
DATABASE_URL: postgresql://postgres-1:5432/pid
DATABASE_USERNAME: opertusmundi
DATABASE_PASSWORD_FILE: /secrets/database-password
ports: ['127.0.0.1:30525:8000']
'mailer':
image: opertusmundi/mailer:1.0.0
depends_on:
- 'postgres'
networks:
internal_network: {}
volumes:
- type: bind
source: ./secrets/jwt-secret
target: /secrets/jwt-secret
read_only: true
- type: bind
source: ./secrets/postgres/opertusmundi-password
target: /secrets/database-password
read_only: true
- type: bind
source: ./secrets/mailer/mail-password
target: /secrets/mail-password
read_only: true
- type: bind
source: ./logs/mailer
target: /app/logs
environment:
JAVA_OPTS: >-
-server -Xmx512m -Xms128m -Djava.security.egd=file:///dev/urandom
JWT_SECRET_FILE: /secrets/jwt-secret
MAIL_HOST: ${MAIL_HOST:-localhost}
MAIL_PORT: ${MAIL_PORT:-587}
MAIL_USERNAME: ${MAIL_USERNAME}
MAIL_PASSWORD_FILE: /secrets/mail-password
DATABASE_URL: jdbc:postgresql://postgres-1:5432/opertusmundi
DATABASE_USERNAME: opertusmundi
DATABASE_PASSWORD_FILE: /secrets/database-password
'messenger':
image: opertusmundi/messenger:1.0.0
depends_on:
- 'postgres'
networks:
internal_network: {}
volumes:
- type: bind
source: ./secrets/jwt-secret
target: /secrets/jwt-secret
read_only: true
- type: bind
source: ./secrets/postgres/opertusmundi-password
target: /secrets/database-password
read_only: true
- type: bind
source: ./logs/messenger/
target: /app/logs
environment:
JAVA_OPTS: >-
-server -Xmx512m -Xms128m -Djava.security.egd=file:///dev/urandom
JWT_SECRET_FILE: /secrets/jwt-secret
DATABASE_URL: jdbc:postgresql://postgres-1:5432/opertusmundi
DATABASE_USERNAME: opertusmundi
DATABASE_PASSWORD_FILE: /secrets/database-password
'api_gateway':
image: opertusmundi/api-gateway:1.0.0
depends_on:
- 'postgres'
- 'elasticsearch'
networks:
internal_network:
aliases:
- 'api'
volumes:
- type: bind
source: ./logs/api-gateway
target: /app/logs
- type: bind
source: ./secrets/postgres/opertusmundi-password
target: /secrets/database-password
read_only: true
- type: bind
source: ./secrets/jwt-secret
target: /secrets/jwt-secret
read_only: true
- type: bind
source: ./secrets/mangopay-client-password
target: /secrets/mangopay-client-password
read_only: true
- type: bind
source: ./secrets/camunda/admin-password
target: /secrets/camunda-admin-password
read_only: true
- type: bind
source: ./secrets/jupyterhub-access-token
target: /secrets/jupyterhub-access-token
read_only: true
- type: bind
source: ./secrets/signatory-keystore
target: /secrets/signatory-keystore
read_only: true
- type: bind
source: ./secrets/signatory-keystore-password
target: /secrets/signatory-keystore-password
read_only: true
- type: volume
source: files_assets
target: /var/local/opertusmundi/files/assets
- type: volume
source: files_contracts
target: /var/local/opertusmundi/files/contracts
- type: volume
source: files_drafts
target: /var/local/opertusmundi/files/drafts
- type: volume
source: files_users
target: /var/local/opertusmundi/files/users
- type: volume
source: files_temp
target: /var/local/opertusmundi/files/temp
- type: volume
source: ingest_input
target: /var/local/opertusmundi/ingest/input
- type: volume
source: profile_input
target: /var/local/opertusmundi/profile/input
environment:
JAVA_OPTS: >-
-server -Xmx1024m -Xms256m -Djava.security.egd=file:///dev/urandom
PUBLIC_URL: ${MARKETPLACE_URL}
SECURITY_CSRF_ENABLED: 'true'
DATABASE_URL: jdbc:postgresql://postgres-1:5432/opertusmundi
DATABASE_USERNAME: opertusmundi
DATABASE_PASSWORD_FILE: /secrets/database-password
JWT_SECRET_FILE: /secrets/jwt-secret
MANGOPAY_BASE_URL: https://api.sandbox.mangopay.com
MANGOPAY_CLIENT_ID: ${MANGOPAY_CLIENT_ID}
MANGOPAY_CLIENT_PASSWORD_FILE: /secrets/mangopay-client-password
CATALOGUE_BASE_URL: http://catalogueapi:5000/
INGEST_BASE_URL: http://ingest:5000/
MAILER_BASE_URL: http://mailer:8105/
MESSENGER_BASE_URL: http://messenger:8110/
RATING_BASE_URL: ""
RATING_USERNAME: ""
RATING_PASSWORD_FILE: ""
PID_BASE_URL: http://pid:5000/
PROFILE_BASE_URL: http://profile:5000/
ELASTICSEARCH_BASE_URL: http://elasticsearch:9200
ELASTICSEARCH_INDICES_ASSETS_INDEX_NAME: assets
ELASTICSEARCH_INDICES_ASSETS_VIEW_INDEX_NAME: assets_view
ELASTICSEARCH_INDICES_ASSETS_VIEW_AGGREGATE_INDEX_NAME: assets_view_aggregate
ELASTICSEARCH_INDICES_PROFILES_INDEX_NAME: profiles
BPM_REST_BASE_URL: http://bpm-server:8000/engine-rest
BPM_REST_USERNAME: admin
BPM_REST_PASSWORD_FILE: /secrets/camunda-admin-password
JUPYTERHUB_URL: http://jupyterhub/
JUPYTERHUB_API_URL: http://jupyterhub/hub/api
JUPYTERHUB_API_KEY_FILE: /secrets/jupyterhub-access-token
GEOSERVER_BASE_URL: http://geoserver:8080/geoserver
CONTRACT_SIGNPDF_KEYSTORE: /secrets/signatory-keystore
CONTRACT_SIGNPDF_KEYSTORE_PASSWORD_FILE: /secrets/signatory-keystore-password
CONTRACT_SIGNPDF_KEY_ALIAS: '1'
ports: ['127.0.0.1:30080:8000']
'web':
image: nginx:1.21-alpine
networks:
internal_network: {}
volumes:
- type: bind
source: ./files/web/nginx/conf.d/
target: /etc/nginx/conf.d/
read_only: true
- type: bind
source: ./secrets/web/server.pem
target: /secrets/server.pem
read_only: true
- type: bind
source: ./logs/web/
target: /var/log/nginx
environment:
[]
ports: ['8443:443']