-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.local-dev.yml
More file actions
502 lines (477 loc) · 14.3 KB
/
docker-compose.local-dev.yml
File metadata and controls
502 lines (477 loc) · 14.3 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
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
name: aoe-local
services:
aoe-web-frontend:
build:
context: aoe-web-frontend
dockerfile: ./docker/Dockerfile.local
args:
NODE_VERSION: ${NODE_VERSION}
image: ${AOE_WEB_FRONTEND_TAG-aoe-web-frontend-local-dev:latest}
container_name: aoe-web-frontend
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- ./aoe-web-frontend/src:/app/src:rw
- ./aoe-web-frontend/public:/app/public:rw
user: "root:5606"
ports:
- 8282:80
- 33344:8080
environment:
- ENV=demo
aoe-streaming-app:
hostname: aoe-streaming-app
build:
context: aoe-streaming-app
dockerfile: ./docker/Dockerfile
args:
NODE_VERSION: ${NODE_VERSION}
image: ${AOE_STREAMING_APP_TAG-aoe-streaming-app:latest}
container_name: aoe-streaming-app
restart: unless-stopped
environment:
- NODE_ENV=development
- PORT=3001
ports:
- 3001:3001
env_file:
- path: ./aoe-streaming-app/.env.ci
aoe-data-services:
hostname: aoe-data-services
build:
context: aoe-data-services
dockerfile: ./Dockerfile
image: ${AOE_DATA_SERVICES_TAG-aoe-data-services:latest}
restart: unless-stopped
ports:
- 8002:8002
env_file:
- path: ./aoe-data-services/.env.ci
aoe-semantic-apis:
hostname: aoe-semantic-apis
build:
context: aoe-semantic-apis
dockerfile: ./docker/Dockerfile
args:
NODE_VERSION: ${NODE_VERSION}
image: ${AOE_SEMANTIC_APIS_TAG-aoe-semantic-apis:latest}
container_name: aoe-semantic-apis
restart: unless-stopped
environment:
- NODE_ENV=development
- LOG_LEVEL=info
- PORT_LISTEN=3002
ports:
- 3002:3002
env_file:
- path: ./aoe-semantic-apis/.env.ci
required: true
command: sh -c "npm run start"
aoe-data-analytics:
hostname: aoe-data-analytics
build:
context: aoe-data-analytics
dockerfile: ./Dockerfile
secrets:
- trust_store_password
image: ${AOE_DATA_ANALYTICS_TAG-aoe-data-analytics:latest}
container_name: aoe-data-analytics
restart: unless-stopped
entrypoint:
[
"java",
"-Xms512m",
"-Xmx512m",
"-Djava.security.egd=file:/dev/./urandom",
"-jar",
"aoe-data-analytics.jar",
]
ports:
- 8080:8080
env_file:
- path: ./aoe-data-analytics/.env.ci
logging:
options:
max-size: "10m"
max-file: "3"
aoe-web-backend:
build:
context: aoe-web-backend
dockerfile: ./docker/Dockerfile.local
args:
NODE_VERSION: ${NODE_VERSION}
image: ${AOE_WEB_BACKEND_TAG-aoe-web-backend:latest}
container_name: aoe-web-backend
healthcheck:
test:
["CMD", "wget", "--spider", "-q", "http://aoe-web-backend:3000/health"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
volumes:
- ./docker/dev/web/thumbnail/:/app/thumbnail:rw
- ./docker/dev/web/uploads:/app/uploads:rw
- ./docker/dev/web/webdata:/webdata:rw
- ./docker/dev/web/webdata/htmlfolder:/webdata/htmlfolder:rw
- ./aoe-web-backend/src:/app/src:rw
environment:
- NODE_ENV=development
ports:
- 3000:3000
env_file:
- ./aoe-web-backend/.env.ci
redis:
image: redis:6.2.21-alpine@sha256:2da4679295e9402100d6ddafe65705f0fefc4173ff7bd0968c1c09f14e940779
container_name: redis
privileged: true
command:
[
"redis-server",
"--requirepass",
"dev_password",
"--user",
"devuser",
"on",
">devuser_password",
"~*",
"+@all",
"--user",
"default",
"off",
"nopass",
"nocommands",
]
restart: unless-stopped
environment:
REDIS_REPLICATION_MODE: master
volumes:
- ./docker/dev/redis_data:/data
healthcheck:
test:
[
"CMD-SHELL",
"redis-cli -u redis://devuser:devuser_password@localhost:6379 ping | grep PONG",
]
interval: 30s
timeout: 10s
retries: 5
start_period: 10s
ports:
- 6379:6379
aoe-postgres:
image: postgres:15-alpine@sha256:09e4f20b14ddb3dfe3a0c825b206032aaf8f28300ba2070c0b60fc1c10c6abc7
container_name: aoe-postgres
ports:
- 5432:5432
environment:
POSTGRES_USER: aoeuser
POSTGRES_PASSWORD: aoepassword
POSTGRES_DB: aoe
healthcheck:
test: ["CMD-SHELL", "pg_isready -U aoeuser"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- ./docker/init-scripts/aoe-init.sql:/docker-entrypoint-initdb.d/1-init.sql
- ./docker/init-scripts/aoe-user.sql:/docker-entrypoint-initdb.d/2-init.sql
opensearch:
image: opensearchproject/opensearch:2.19.5@sha256:3a73623acf3cdd566ad7d0c6c06190a528e6b8a5d54fe1f4327258e32bd8df26
container_name: opensearch
environment:
- cluster.name=opensearch-cluster
- node.name=opensearch-node
- discovery.type=single-node
- bootstrap.memory_lock=true
- plugins.security.disabled=true
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=Asfsadfsad!@2
volumes:
- ./docker/dev/os_data:/usr/share/opensearch/data
ulimits:
memlock:
soft: -1
hard: -1
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9200/_cluster/health"]
interval: 10s
timeout: 5s
retries: 5
ports:
- 9200:9200
- 9600:9600
aoe-mongodb:
image: mongo:4.0
container_name: aoe-mongodb
environment:
MONGO_INITDB_ROOT_USERNAME: aoerootuser
MONGO_INITDB_ROOT_PASSWORD: aoerootpassword
MONGO_INITDB_DATABASE: aoe
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
volumes:
- ./docker/dev/mongo_data:/data/db
- ./docker/init-scripts/init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js
ports:
- 27017:27017
zookeeper:
image: confluentinc/cp-zookeeper:7.9.6@sha256:d3294ad2b353ac5a155ad9abe37884f75c482f387af553679210303b7118a0d3
container_name: zookeeper
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
ZOOKEEPER_LOG4J_ROOT_LOGLEVEL: INFO
healthcheck:
test: ["CMD", "nc", "-z", "localhost", "2181"]
interval: 10s
timeout: 5s
retries: 5
start_period: 20s
ports:
- 2181:2181
kafka:
image: confluentinc/cp-kafka:7.9.6@sha256:9e178783dba8cf44cd8b1d260f548a587a21235921957edd4ed7aa7d060b0852
container_name: kafka
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka:9092,OUTSIDE://kafka:29092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,OUTSIDE:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 2
KAFKA_LOG4J_ROOT_LOGLEVEL: INFO
KAFKA_LOG4J_LOGGERS: kafka=INFO,kafka.network.RequestChannel$=WARN,kafka.producer.async.DefaultEventHandler=INFO,kafka.request.logger=WARN,kafka.controller=INFO,kafka.log.LogCleaner=INFO,state.change.logger=INFO,kafka.authorizer.logger=INFO
ports:
- 29092:29092
healthcheck:
test: ["CMD", "nc", "-z", "localhost", "9092"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
kafka2:
image: confluentinc/cp-kafka:7.9.6@sha256:9e178783dba8cf44cd8b1d260f548a587a21235921957edd4ed7aa7d060b0852
container_name: kafka2
environment:
KAFKA_BROKER_ID: 2
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka2:9092,OUTSIDE://kafka2:39092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,OUTSIDE:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 2
KAFKA_LOG4J_ROOT_LOGLEVEL: INFO
KAFKA_LOG4J_LOGGERS: kafka=INFO,kafka.network.RequestChannel$=WARN,kafka.producer.async.DefaultEventHandler=INFO,kafka.request.logger=WARN,kafka.controller=INFO,kafka.log.LogCleaner=INFO,state.change.logger=INFO,kafka.authorizer.logger=INFO
ports:
- 39092:39092
healthcheck:
test: ["CMD", "nc", "-z", "localhost", "9092"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
localstack:
image: localstack/localstack:4.14.0@sha256:3ebc37595918b8accb852f8048fef2aff047d465167edd655528065b07bc364a
container_name: localstack
networks:
default:
aliases:
- aoe.s3.localhost.localstack.cloud
- aoepdf.s3.localhost.localstack.cloud
- aoethumbnail.s3.localhost.localstack.cloud
environment:
- SERVICES=s3
- AWS_ACCESS_KEY_ID=test
- AWS_SECRET_ACCESS_KEY=test
- DEBUG="1"
- HOSTNAME_EXTERNAL=localhost
ports:
- 4566:4566
volumes:
- ./docker/init-scripts/aws-shutdown.sh:/etc/localstack/init/shutdown.d/aws-shutdown.sh
- ./docker/init-scripts/init-aws.sh:/etc/localstack/init/ready.d/init-aws.sh
- ./docker/dev/localstack/S3:/host-directory
aoe-oidc-server:
hostname: aoe-oidc-server
image: ghcr.io/soluto/oidc-server-mock:9.0.1@sha256:4cf0fe8752cdf78266e5178ee6551762e398ec0c6be6abea154fab32646db6b0
container_name: aoe-oidc-server
restart: on-failure:2
expose:
- 80
healthcheck:
test:
[
"CMD",
"curl",
"-f",
"http://localhost:80/.well-known/openid-configuration",
]
interval: 30s
timeout: 10s
retries: 3
start_period: 5s
environment:
ASPNETCORE_ENVIRONMENT: Development
SERVER_OPTIONS_INLINE: |
{
"AccessTokenJwtType": "JWT",
"Discovery": {
"ShowKeySet": true
},
"Authentication": {
"CookieSameSiteMode": "Lax",
"CheckSessionCookieSameSiteMode": "Lax"
}
}
OVERRIDE_STANDARD_IDENTITY_RESOURCES: true
IDENTITY_RESOURCES_INLINE: |
[
{
"Name": "profile",
"ClaimTypes": [ "name", "given_name", "family_name", "uid", "id" ]
},
{
"Name": "openid",
"ClaimTypes": [ "sub" ]
}
]
USERS_CONFIGURATION_INLINE: |
[
{
"SubjectId": "aoeuser-1",
"Username": "aoeuser",
"Password": "password123",
"Claims": [
{
"Type": "sub",
"Value": "aoeuser-1",
"ValueType": "string"
},
{
"Type": "locale",
"Value": "de",
"ValueType": "string"
},
{
"Type": "uid",
"Value": "c37ccf17-c8b8-4d5f-b2be-a751f8a4f46e",
"ValueType": "string"
},
{
"Type": "id",
"Value": "1",
"ValueType": "string"
},
{
"Type": "name",
"Value": "AOE User",
"ValueType": "string"
},
{
"Type": "given_name",
"Value": "AOE_first",
"ValueType": "string"
},
{ 'Type': 'some-custom-identity-user-claim', 'Value': "Jack's Custom User Claim", 'ValueType': 'string' },
{
"Type": "family_name",
"Value": "AOE_last",
"ValueType": "string"
},
{
"Type": "email",
"Value": "aoeuser@aoe.fi",
"ValueType": "string"
}
]
},
{
"SubjectId": "tuomas-jukola",
"Username": "tuomas.jukola",
"Password": "password123",
"Claims": [
{
"Type": "sub",
"Value": "tuomas-jukola",
"ValueType": "string"
},
{
"Type": "locale",
"Value": "fi",
"ValueType": "string"
},
{
"Type": "uid",
"Value": "d48ddf28-d9c9-5e6g-c3cf-b862g9b5g57f",
"ValueType": "string"
},
{
"Type": "id",
"Value": "2",
"ValueType": "string"
},
{
"Type": "name",
"Value": "Tuomas Jukola",
"ValueType": "string"
},
{
"Type": "given_name",
"Value": "Tuomas",
"ValueType": "string"
},
{
"Type": "family_name",
"Value": "Jukola",
"ValueType": "string"
},
{
"Type": "email",
"Value": "tuomas.jukola@aoe.fi",
"ValueType": "string"
}
]
}
]
CLIENTS_CONFIGURATION_INLINE: |
[
{
"ClientId": "aoe-client",
"ClientSecrets": ["aoe-secret"],
"RedirectUris": ["https://demo.aoe.fi/api/secure/redirect",
"http://localhost:33344/api/secure/redirect"],
"AllowedScopes": ["openid", "offline_access", "profile"],
"AllowOfflineAccess" : "true",
"AllowedGrantTypes": ["authorization_code"]
}
]
ASPNETCORE_URLS: http://+:80
ASPNET_SERVICES_OPTIONS_INLINE: |
{
"ForwardedHeadersOptions": {
"ForwardedHeaders" : "All"
}
}
nginx:
image: nginx:latest@sha256:6e23479198b998e5e25921dff8455837c7636a67111a04a635cf1bb363d199dc
container_name: nginx
hostname: nginx
ports:
- 443:443
- 80:80
volumes:
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./docker/nginx/nginx-selfsigned.crt:/etc/nginx/certs/nginx-selfsigned.crt:ro
- ./docker/nginx/nginx-selfsigned.key:/etc/nginx/certs/nginx-selfsigned.key:ro
networks:
default:
name: aoe_local-dev
volumes:
postgres_data:
secrets:
trust_store_password:
environment: TRUST_STORE_PASSWORD