-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
406 lines (384 loc) · 14.6 KB
/
docker-compose.yaml
File metadata and controls
406 lines (384 loc) · 14.6 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
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
# https://docs.docker.com/compose/compose-file/
x-common-variables: &common-variables
JAVA_TOOL_OPTIONS: -XX:MaxRAMPercentage=60.0
USERCTX_KEY: JWTSecretKeyDontUseInProduction!
sso.jwt.internal.signature.key.type: VALUE
sso.jwt.internal.signature.key.value: JWTSecretKeyDontUseInProduction!
server.shutdown: graceful
server.max-http-header-size: 64KB
server.forward-headers-strategy: framework
eureka.client.serviceUrl.defaultZone: http://registry:8080/eureka
eureka.client.registry-fetch-interval-seconds: 15
eureka.client.instance-info-replication-interval-seconds: 15
eureka.client.healthcheck.enabled: true
eureka.instance.non-secure-port: 8080
eureka.instance.prefer-ip-address: true
eureka.instance.initialStatus: STARTING
management.endpoints.web.exposure.include: '*'
management.endpoints.enabled-by-default: true
management.security.roles: ANONYMOUS,ACTUATOR
management.endpoint.env.show-values: ALWAYS
management.endpoint.env.post.enabled: true
management.endpoint.configprops.show-values: ALWAYS
spring.main.banner-mode: off
spring.cloud.config.enabled: false
spring.cloud.kubernetes.enabled: false
backbase.audit.enabled: false
backbase.security.public.paths: /integration-api/**
backbase.security.mtls.enabled: false
backbase.http.request-logging-filter.max-payload-length: 5000
logging.level.com.backbase: DEBUG
logging.level.org.springframework.web.filter.CommonsRequestLoggingFilter: DEBUG
# Observability - Tracing Configuration
management.tracing.enabled: false
management.tracing.propagation.type: w3c
management.tracing.sampling.probability: 1.0
management.tracing.baggage.remote-fields: client-id
management.tracing.baggage.correlation.fields: client-id
# management.zipkin.tracing.endpoint: http://zipkin:9411/api/v2/spans
spring.autoconfigure.exclude: org.springframework.boot.actuate.autoconfigure.tracing.zipkin.ZipkinAutoConfiguration
management.otlp.tracing.endpoint: http://otel-collector:4318/v1/traces
x-database-variables: &database-variables
logging.level.liquibase: INFO
spring.liquibase.enabled: true
spring.datasource.username: root
spring.datasource.password: root
spring.datasource.driver-class-name: com.mysql.cj.jdbc.Driver
x-message-broker-variables: &message-broker-variables
spring.activemq.broker-url: tcp://activemq:61616
spring.activemq.user: admin
spring.activemq.password: admin
x-healthcheck-defaults: &healthcheck-defaults
start_period: 60s
interval: 15s
timeout: 3s
retries: 15
name: backbase
volumes:
mysql_data:
driver: local
services:
mysql:
image: mysql:8.4.0
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: root
volumes:
- mysql_data:/var/lib/mysql
healthcheck:
test: mysqladmin ping --silent
interval: 10s
timeout: 5s
retries: 5
activemq:
image: apache/activemq-classic
ports:
- "61616:61616"
- "8161:8161"
healthcheck:
test: activemq status
interval: 10s
timeout: 5s
retries: 5
zipkin:
image: openzipkin/zipkin
container_name: zipkin
profiles:
- tracing-tools
environment:
- STORAGE_TYPE=mem
ports:
- "9411:9411"
otel-collector:
image: otel/opentelemetry-collector-contrib:0.82.0
restart: always
profiles:
- tracing-tools
command:
- --config=/etc/otelcol-contrib/otel-collector.yml
volumes:
- ./docker/collector/otel-collector.yml:/etc/otelcol-contrib/otel-collector.yml
ports:
- "1888:1888" # pprof extension
- "8888:8888" # Prometheus metrics exposed by the collector
- "8889:8889" # Prometheus exporter metrics
- "13133:13133" # health_check extension
- "4317:4317" # OTLP gRPC receiver
- "4318:4318" # OTLP http receiver
- "55679:55679" # zpages extension
depends_on:
- zipkin
registry:
image: repo.backbase.com/backbase-docker-releases/registry:${BB_VERSION}
ports:
- "8761:8080"
environment:
management.tracing.enabled: false
volumes:
- ./exe/HealthCheck.jar:/tmp/HealthCheck.jar
healthcheck:
<<: *healthcheck-defaults
test: [ "CMD", "java", "-jar", "-Xms5M", "-Xmx10M", "/tmp/HealthCheck.jar" ]
edge:
image: repo.backbase.com/backbase-docker-releases/edge:${BB_VERSION}
ports:
- "8280:8080"
environment:
<<: *common-variables
spring.application.name: "edge"
gateway.actuator.security.enabled: false
gateway.csrf.enabled: false
volumes:
- ./exe/HealthCheck.jar:/tmp/HealthCheck.jar
healthcheck:
<<: *healthcheck-defaults
test: [ "CMD", "java", "-jar", "-Xms5M", "-Xmx10M", "/tmp/HealthCheck.jar", "http://localhost:8080/actuator/serviceregistry" ]
links:
- registry
token-converter:
image: repo.backbase.com/backbase-docker-releases/oidc-token-converter-service:${BB_VERSION}
ports:
- "7779:8080"
environment:
<<: *common-variables
spring.application.name: "token-converter"
backbase.security.public.paths: /oauth/token,/convert
backbase.oidc-token-converter.whitelistedDomains[0].internalHostScheme: http
backbase.oidc-token-converter.whitelistedDomains[0].internalHost: backbase-identity:8080
backbase.oidc-token-converter.whitelistedDomains[0].issuerHost: localhost
volumes:
- ./exe/HealthCheck.jar:/tmp/HealthCheck.jar
healthcheck:
<<: *healthcheck-defaults
test: [ "CMD", "java", "-jar", "-Xms5M", "-Xmx10M", "/tmp/HealthCheck.jar", "http://localhost:8080/actuator/serviceregistry" ]
links:
- registry
backbase-identity:
image: repo.backbase.com/backbase-docker-releases/auth-server-builder:${BB_VERSION}
entrypoint: /opt/keycloak/bin/auth-server-buildconfig-and-run.sh
command:
- start-dev
- --import-realm
ports:
- '8180:8080'
environment:
KEYCLOAK_ADMIN: "admin"
KEYCLOAK_ADMIN_PASSWORD: "admin"
BACKBASE_HTTP_CORS: "true"
BACKBASE_HTTP_CORS_EXPOSED_HEADERS: "Location"
BACKBASE_HTTP_CORS_ORIGINS: "http://localhost:4200,http://localhost:8080"
KC_DB: "mysql"
KC_DB_URL: "jdbc:mysql://mysql:3306/backbase_identity?useSSL=false&allowPublicKeyRetrieval=true&cacheServerConfiguration=true&createDatabaseIfNotExist=true"
KC_DB_USERNAME: "root"
KC_DB_PASSWORD: "root"
KC_TRANSACTION_XA_ENABLED: "true"
KC_LOG_LEVEL: "INFO"
KC_LOG_CONSOLE_FORMAT: "%d{yyy:MM:dd HH:mm:ss.SSS} %-5p [%X{traceId},%X{spanId},%X{sampled}] %i --- [%t] %c{2.} : %m%n"
KC_HOSTNAME: "http://localhost:8180/auth/"
KC_SPI_SERVICE_TOKEN_DEFAULT_URL: "http://token-converter:8080"
KC_SPI_USER_MANAGER_CLIENT_DEFAULT_URL: "http://user-manager:8080"
KC_SPI_CONNECTIONS_JPA_LEGACY_INITIALIZE_EMPTY: "true"
KC_SPI_CONNECTIONS_JPA_LEGACY_MIGRATION_STRATEGY: "update"
JAVA_TOOL_OPTIONS: "-Dquarkus.log.category.'\"com.backbase\"'.level=DEBUG \
-Dquarkus.log.category.'\"org.keycloak.protocol.oidc\"'.level=TRACE"
volumes:
- ./identity:/opt/keycloak/data/import
- ./exe/HealthCheck.jar:/tmp/HealthCheck.jar
healthcheck:
<<: *healthcheck-defaults
test: [ "CMD", "java", "-jar", "-Xms5M", "-Xmx10M", "/tmp/HealthCheck.jar", "http://localhost:8080/auth/realms/backbase/.well-known/openid-configuration", "backbase" ]
depends_on:
mysql:
condition: service_healthy
access-control:
image: repo.backbase.com/backbase-docker-releases/access-control:${BB_VERSION}
ports:
- "8040:8080"
environment:
<<: [*common-variables, *message-broker-variables, *database-variables]
spring.application.name: "access-control"
spring.datasource.url: jdbc:mysql://mysql:3306/access-control?useSSL=false&allowPublicKeyRetrieval=true&cacheServerConfiguration=true&createDatabaseIfNotExist=true
volumes:
- ./exe/HealthCheck.jar:/tmp/HealthCheck.jar
healthcheck:
<<: *healthcheck-defaults
test: [ "CMD", "java", "-jar", "-Xms5M", "-Xmx10M", "/tmp/HealthCheck.jar", "http://localhost:8080/actuator/serviceregistry" ]
depends_on:
mysql:
condition: service_healthy
links:
- activemq
- registry
arrangement-manager:
image: repo.backbase.com/backbase-docker-releases/arrangement-manager:${BB_VERSION}
ports:
- "8050:8080"
environment:
<<: [*common-variables, *message-broker-variables, *database-variables]
spring.application.name: "arrangement-manager"
spring.datasource.url: jdbc:mysql://mysql:3306/arrangement-manager?useSSL=false&allowPublicKeyRetrieval=true&cacheServerConfiguration=true&createDatabaseIfNotExist=true
volumes:
- ./exe/HealthCheck.jar:/tmp/HealthCheck.jar
healthcheck:
<<: *healthcheck-defaults
test: [ "CMD", "java", "-jar", "-Xms5M", "-Xmx10M", "/tmp/HealthCheck.jar", "http://localhost:8080/actuator/serviceregistry" ]
depends_on:
mysql:
condition: service_healthy
links:
- activemq
- registry
user-manager:
image: repo.backbase.com/backbase-docker-releases/user-manager:${BB_VERSION}
ports:
- "8060:8080"
environment:
<<: [*common-variables, *message-broker-variables, *database-variables]
spring.application.name: "user-manager"
spring.datasource.url: jdbc:mysql://mysql:3306/user-manager?useSSL=false&allowPublicKeyRetrieval=true&cacheServerConfiguration=true&createDatabaseIfNotExist=true
backbase.users.identity-endpoints-enabled: true
backbase.users.identity-integration-enabled: true
backbase.users.sync-primary-to-identity-enabled: true
spring.cloud.discovery.client.simple.instances.user-integration-outbound-service[0].uri: http://wiremock:8080
backbase.users.realms[0].realm-name: "backbase"
volumes:
- ./exe/HealthCheck.jar:/tmp/HealthCheck.jar
healthcheck:
<<: *healthcheck-defaults
test: [ "CMD", "java", "-jar", "-Xms5M", "-Xmx10M", "/tmp/HealthCheck.jar", "http://localhost:8080/actuator/serviceregistry" ]
depends_on:
mysql:
condition: service_healthy
links:
- activemq
- registry
identity-integration-service:
image: repo.backbase.com/backbase-docker-releases/identity-integration-service:${BB_VERSION}
ports:
- "8070:8080"
environment:
<<: *common-variables
identity.serverUrl: http://backbase-identity:8080/auth
identity.masterAdmin.username: admin
identity.masterAdmin.password: admin
identity.realmConfiguration.fallbackOptions.enableUser: true
identity.realmConfiguration.fallbackOptions.useTemporaryPassword: true
volumes:
- ./exe/HealthCheck.jar:/tmp/HealthCheck.jar
healthcheck:
<<: *healthcheck-defaults
test: [ "CMD", "java", "-jar", "-Xms5M", "-Xmx10M", "/tmp/HealthCheck.jar", "http://localhost:8080/actuator/serviceregistry" ]
links:
- registry
bootstrap-job:
image: bootstrap-job:${BOOTSTRAP_JOB_VERSION}
profiles:
- bootstrap
build:
context: ../images/bootstrap
secrets:
- mvnrepo
# - mvnrepokey # Optional: In case your maven credentials are encrypted with `mvn --encrypt-password`
args:
JOB_VERSION: ${BOOTSTRAP_JOB_VERSION}
environment:
<<: *common-variables
spring.autoconfigure.exclude: org.springframework.boot.autoconfigure.security.oauth2.client.reactive.ReactiveOAuth2ClientAutoConfiguration
backbase.communication.http.discoverable-access-token-service: true
backbase.stream.limits.worker.enabled: false
backbase.bootstrap.data.active-data-sets: local-backend-setup
backbase.bootstrap.data.legal-entity-prefix.enabled: false
backbase.bootstrap.ingestions.identity-users.enabled: false
backbase.bootstrap.ingestions.messages.enabled: false
backbase.bootstrap.ingestions.push-integration.enabled: false
backbase.bootstrap.ingestions.content-repository.enabled: false
backbase.bootstrap.ingestions.fido-applications.enabled: false
backbase.bootstrap.identity.baseUrl: http://backbase-identity:8080/auth
admin.baseUrl: http://backbase-identity:8080
volumes:
- ./data/:/opt/resources/
depends_on:
token-converter:
condition: service_healthy
access-control:
condition: service_healthy
arrangement-manager:
condition: service_healthy
user-manager:
condition: service_healthy
identity-integration-service:
condition: service_healthy
backbase-identity:
condition: service_healthy
wiremock:
image: wiremock/wiremock:2.32.0
profiles:
- with-mocks
command:
- --global-response-templating
- --verbose
volumes:
- ./stubs:/home/wiremock
postman-health-check:
image: postman/newman
command:
run /etc/newman/postman_collection.json --environment="/etc/newman/postman_environment.json"
volumes:
- ../../test/postman/HealthCheck_Local-Backend-Environment.postman_collection.json:/etc/newman/postman_collection.json
- ../../test/postman/Docker-Backend-Environment.postman_environment.json:/etc/newman/postman_environment.json
depends_on:
access-control:
condition: service_healthy
arrangement-manager:
condition: service_healthy
backbase-identity:
condition: service_healthy
identity-integration-service:
condition: service_healthy
token-converter:
condition: service_healthy
user-manager:
condition: service_healthy
# <EXAMPLE-SERVICE-NAME>:
# image: <DOCKER-REGISTRY>/<REPOSITORY-NAME>:<TAG>
# ports:
# - "8090:8080"
# environment:
# <<: *common-variables
# spring.application.name: "<SERVICE-NAME>"
# eureka.client.enabled: 'true'
# volumes:
# - ./scripts/HealthCheck.jar:/tmp/HealthCheck.jar
# healthcheck:
# <<: *healthcheck-defaults
# test: [ "CMD", "java", "-jar", "-Xms5M", "-Xmx10M", "/tmp/HealthCheck.jar", "http://localhost:8080/actuator/serviceregistry" ]
# links:
# - registry
prometheus:
image: prom/prometheus
profiles:
- observable
volumes:
- ./monitor/prometheus.yml:/etc/prometheus/prometheus.yml
command:
- --config.file=/etc/prometheus/prometheus.yml
restart: always
ports:
- '9090:9090'
grafana:
image: grafana/grafana
profiles:
- observable
volumes:
- ./monitor/grafana-datasource.yml:/etc/grafana/provisioning/datasources/datasources.yml
restart: always
ports:
- "3000:3000"
depends_on:
- prometheus
secrets:
mvnrepo:
file: ${HOME}/.m2/settings.xml
mvnrepokey:
file: ${HOME}/.m2/settings-security.xml # Optional: In case your maven credentials are encrypted with `mvn --encrypt-password`