-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
414 lines (388 loc) · 13.3 KB
/
docker-compose.yml
File metadata and controls
414 lines (388 loc) · 13.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
services:
mongo:
image: mongo:8.0.10
ports:
- 27017:27017
volumes:
- mongo-data-directory:/data/db
networks:
- elk
rabbitmq:
image: rabbitmq:4.1.1-management
restart: "no"
ports:
- "5672:5672"
- "15672:15672"
healthcheck:
test: ["CMD", "rabbitmqctl", "status"]
interval: 30s
timeout: 10s
retries: 5
networks:
- elk
webprotege-keycloak:
image: protegeproject/webprotege-keycloak:2.0.1
ports:
- 8080:8080
depends_on:
rabbitmq:
condition: service_healthy
environment:
KC_PROXY_HEADERS: xforwarded
KC_HOSTNAME: ${SERVER_HOST}
KC_HOSTNAME_STRICT: "false"
KC_HTTP_RELATIVE_PATH: /keycloak
KC_HTTP_ENABLED: "true"
KEYCLOAK_ADMIN: ${KEYCLOAK_ADMIN:-admin}
KEYCLOAK_ADMIN_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD:-password}
SERVER_HOST: ${SERVER_HOST}
KC_LOG_LEVEL: ${KC_LOG_LEVEL:-INFO}
KC_FEATURES: hostname
volumes:
- keycloak-h2-directory:/opt/keycloak/data
healthcheck:
# Verify the realm's frontendUrl has been patched by entrypoint.sh to
# match SERVER_HOST, not just that the realm exists. Without the
# frontendUrl check the healthcheck can pass in the window between
# realm import and the entrypoint's kcadm patch, during which
# Keycloak serves stale discovery documents. Tracked upstream in
# https://github.com/protegeproject/webprotege-keycloak/issues/6.
test:
- CMD-SHELL
- '/opt/keycloak/bin/kcadm.sh get realms/webprotege --fields "attributes(frontendUrl)" --server "http://localhost:8080$${KC_HTTP_RELATIVE_PATH:-}" --realm master --user "$$KEYCLOAK_ADMIN" --password "$$KEYCLOAK_ADMIN_PASSWORD" | grep -q ''"frontendUrl" : "http://${SERVER_HOST}/keycloak"'''
interval: 5s
timeout: 5s
retries: 60
networks:
- elk
minio:
image: minio/minio:RELEASE.2024-05-10T01-41-38Z
command: [ "server", "/data", "--console-address", ":9001" ]
restart: always
volumes:
- minio_data:/data
ports:
- '9000:9000'
- '9001:9001'
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-webprotege}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-webprotege}
networks:
- elk
webprotege-gwt-api-gateway:
image: protegeproject/webprotege-gwt-api-gateway:3.0.2
restart: on-failure
ports:
- '5008:5008'
depends_on:
webprotege-keycloak:
condition: service_healthy
minio:
condition: service_started
rabbitmq:
condition: service_healthy
environment:
JDK_JAVA_OPTIONS: --add-opens java.base/sun.net=ALL-UNNAMED
SPRING_RABBITMQ_PUBLISHER_CONFIRM_TYPE: NONE
SPRING_RABBITMQ_PUBLISHER_RETURNS: "FALSE"
webprotege.minio.bucketName: "webprotege-uploads"
webprotege.minio.accessKey: ${MINIO_ROOT_USER:-webprotege}
webprotege.minio.secretKey: ${MINIO_ROOT_PASSWORD:-webprotege}
webprotege.minio.endPoint: http://minio:9000
SPRING_SECURITY_OAUTH2_CLIENT_PROVIDER_KEYCLOAK_ISSUER_URI: http://${SERVER_HOST}/keycloak/realms/webprotege
SPRING_SECURITY_OAUTH2_CLIENT_PROVIDER_KEYCLOAK_AUTHORIZATION_URI: http://${SERVER_HOST}/keycloak/realms/webprotege/protocol/openid-connect/auth
SPRING_SECURITY_OAUTH2_CLIENT_PROVIDER_KEYCLOAK_TOKEN_URI: http://webprotege-keycloak:8080/keycloak/realms/webprotege/protocol/openid-connect/token
SPRING_SECURITY_OAUTH2_CLIENT_PROVIDER_KEYCLOAK_JWK_SET_URI: http://webprotege-keycloak:8080/keycloak/realms/webprotege/protocol/openid-connect/certs
SPRING_SECURITY_OAUTH2_CLIENT_PROVIDER_KEYCLOAK_USER_INFO_URI: http://webprotege-keycloak:8080/keycloak/realms/webprotege/protocol/openid-connect/userinfo
SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_ISSUER_URI: http://${SERVER_HOST}/keycloak/realms/webprotege
SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_JWK_SET_URI: http://webprotege-keycloak:8080/keycloak/realms/webprotege/protocol/openid-connect/certs
spring.servlet.multipart.max-file-size: 300MB
spring.servlet.multipart.max-request-size: 300MB
WEBPROTEGE_ALLOWEDORIGIN: http://${SERVER_HOST}
webprotege.rabbit.timeout: 600000
_JAVA_OPTIONS: ${ENABLE_JAVA_DEBUG:+-Xdebug -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5008}
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
- elk
extra_hosts:
- "${SERVER_HOST}:host-gateway"
webprotege-gwt-ui-server:
image: protegeproject/webprotege-gwt-ui-server:9.0.8
depends_on:
webprotege-gwt-api-gateway:
condition: service_started
webprotege-keycloak:
condition: service_healthy
ports:
- 8888:8080
environment:
minio.access.key: ${MINIO_ROOT_USER:-webprotege}
minio.access.secret: ${MINIO_ROOT_PASSWORD:-webprotege}
minio.endPoint: http://minio:9000
KEYCLOAK_AUTH_URL: http://${SERVER_HOST}/keycloak/
webprotege.gwt-api-gateway.endPoint: http://webprotege-gwt-api-gateway:7777
webprotege.websocketUrl: wss://${SERVER_HOST}/wsapps
webprotege.logoutUrl: http://${SERVER_HOST}/webprotege/logout
webprotege.fileUploadurl: http://${SERVER_HOST}
webprotege.keycloakLogoutUrl: http://${SERVER_HOST}/keycloak/realms/webprotege/protocol/openid-connect/logout
webprotege.rabbit.timeout: 300000
JDK_JAVA_OPTIONS: --add-opens java.base/sun.net=ALL-UNNAMED
_JAVA_OPTIONS: ${ENABLE_JAVA_DEBUG:+-Xdebug -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5006}
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
- elk
webprotege-authorization-service:
image: protegeproject/webprotege-authorization-service:3.0.9
ports:
- '5010:5010'
depends_on:
webprotege-keycloak:
condition: service_healthy
mongo:
condition: service_started
rabbitmq:
condition: service_healthy
environment:
spring.data.mongodb.host: mongo
spring.data.mongodb.database: webprotege
keycloak.jwk-set-uri: http://webprotege-keycloak:8080
SPRING_DATA_MONGODB_URI: "${MONGO_URL}"
JDK_JAVA_OPTIONS: --add-opens java.base/sun.net=ALL-UNNAMED
_JAVA_OPTIONS: ${ENABLE_JAVA_DEBUG:+-Xdebug -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5010}
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
- elk
webprotege-user-management-service:
image: protegeproject/webprotege-user-management-service:1.0.10
depends_on:
webprotege-keycloak:
condition: service_healthy
mongo:
condition: service_started
rabbitmq:
condition: service_healthy
environment:
JDK_JAVA_OPTIONS: --add-opens java.base/sun.net=ALL-UNNAMED
SPRING_DATA_MONGODB_URI: "${MONGO_URL}"
webprotege.keycloak.serverUrl: http://${SERVER_HOST}/keycloak
webprotege.keycloak.clientSecret: ${ADMIN_CLI_SECRET}
webprotege.keycloak.clientId: user-management
LOGGING_LEVEL_ROOT: INFO
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
- elk
webprotege-event-history-service:
image: protegeproject/webprotege-event-history-service:2.0.0
ports:
- '5006:5006'
depends_on:
mongo:
condition: service_started
rabbitmq:
condition: service_healthy
environment:
webprotege.keycloak.serverUrl: http://${SERVER_HOST}/keycloak
LOGGING_LEVEL_ROOT: INFO
LOGGING_LEVEL_ORG_SPRINGFRAMEWORK_DATA_MONGODB_CORE_MONGOTEMPLATE: INFO
LOGGING_LEVEL_ORG_MONGODB_DRIVER: INFO
JDK_JAVA_OPTIONS: --add-opens java.base/sun.net=ALL-UNNAMED
SPRING_DATA_MONGODB_URI: "${MONGO_URL}"
_JAVA_OPTIONS: ${ENABLE_JAVA_DEBUG:+-Xdebug -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5006}
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
- elk
webprotege-ontology-processing-service:
image: protegeproject/webprotege-ontology-processing-service:1.0.7
depends_on:
rabbitmq:
condition: service_healthy
minio:
condition: service_started
environment:
JDK_JAVA_OPTIONS: --add-opens java.base/sun.net=ALL-UNNAMED
webprotege.minio.accessKey: ${MINIO_ROOT_USER:-webprotege}
webprotege.minio.secretKey: ${MINIO_ROOT_PASSWORD:-webprotege}
webprotege.minio.endPoint: http://minio:9000
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
- elk
webprotege-initial-revision-history-service:
image: protegeproject/webprotege-initial-revision-history-service:1.0.8
depends_on:
rabbitmq:
condition: service_healthy
minio:
condition: service_started
environment:
JDK_JAVA_OPTIONS: --add-opens java.base/sun.net=ALL-UNNAMED
webprotege.minio.accessKey: ${MINIO_ROOT_USER:-webprotege}
webprotege.minio.secretKey: ${MINIO_ROOT_PASSWORD:-webprotege}
webprotege.minio.endPoint: http://minio:9000
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
- elk
webprotege-backend-service:
user: root
image: protegeproject/webprotege-backend-service:5.0.2
ports:
- '5005:5005'
depends_on:
mongo:
condition: service_started
rabbitmq:
condition: service_healthy
environment:
webprotege.minio.accessKey: ${MINIO_ROOT_USER:-webprotege}
webprotege.minio.secretKey: ${MINIO_ROOT_PASSWORD:-webprotege}
webprotege.minio.endPoint: http://minio:9000
webprotege.directories.data: /srv/webprotege
SPRING_DATA_MONGODB_URI: "${MONGO_URL}"
_JAVA_OPTIONS: ${ENABLE_JAVA_DEBUG:+-Xdebug -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005}
JDK_JAVA_OPTIONS: --add-opens java.base/sun.net=ALL-UNNAMED
webprotege.rabbit.timeout: 600000
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
- elk
volumes:
- webprotege-data-directory:/srv/webprotege
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.12.2
environment:
- discovery.type=single-node
- xpack.security.enabled=false
- "ES_JAVA_OPTS=-Xms2048m -Xmx2048m"
ports:
- "9200:9200"
volumes:
- elasticsearch-data:/usr/share/elasticsearch/data
networks:
- elk
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9200"]
interval: 30s
timeout: 10s
retries: 5
logstash:
image: docker.elastic.co/logstash/logstash:8.12.2
ports:
- "5044:5044"
- "9600:9600"
environment:
LS_JAVA_OPTS: "-Xmx256m -Xms256m"
volumes:
- ./logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml:ro
- ./logstash/pipeline:/usr/share/logstash/pipeline:ro
networks:
- elk
depends_on:
- elasticsearch
filebeat:
image: docker.elastic.co/beats/filebeat:8.12.2
user: root
volumes:
- ./filebeat/config/filebeat.yml:/usr/share/filebeat/filebeat.yml:ro
- /var/lib/docker/containers:/var/lib/docker/containers:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- elk
depends_on:
- logstash
command: ["filebeat", "-e", "--strict.perms=false", "-c", "/usr/share/filebeat/filebeat.yml"]
kibana:
image: docker.elastic.co/kibana/kibana:8.12.2
ports:
- "5601:5601"
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
- XPACK_SAVED_OBJECTS_IMPORT=/usr/share/kibana/dashboards/webprotege-logs.ndjson
- ELASTICSEARCH_SERVICE_HOST=elasticsearch
- ELASTICSEARCH_SERVICE_PORT=9200
- XPACK_SECURITY_ENABLED=false
- ELASTICSEARCH_USERNAME=kibana_system
- ELASTICSEARCH_PASSWORD=kibana
- SERVER_BASEPATH=/kibana
- SERVER_REWRITEBASEPATH=true
- SERVER_PUBLICBASEURL=http://${SERVER_HOST}/kibana
- SERVER_HOST=0.0.0.0
- SERVER_NAME=kibana
- SERVER_MAXPAYLOADBYTES=1048576
- ELASTICSEARCH_SSL_VERIFICATIONMODE=none
volumes:
- ./kibana/config/kibana.yml:/usr/share/kibana/config/kibana.yml:ro
- ./kibana/dashboards:/usr/share/kibana/dashboards
networks:
- elk
depends_on:
elasticsearch:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://localhost:5601/kibana/api/status | grep -q '\"level\":\"available\"'"]
interval: 30s
timeout: 10s
retries: 10
start_period: 60s
webprotege-nginx:
image: protegeproject/webprotege-nginx:2.0.2
hostname: ${SERVER_HOST}
ports:
- 80:80
depends_on:
webprotege-gwt-ui-server:
condition: service_started
webprotege-gwt-api-gateway:
condition: service_started
webprotege-keycloak:
condition: service_healthy
kibana:
condition: service_healthy
networks:
- elk
mailpit:
image: axllent/mailpit:v1.29.5
ports:
- 8025:8025
- 1025:1025
networks:
- elk
volumes:
webprotege-data-directory:
mongo-data-directory:
keycloak-h2-directory:
minio_data:
elasticsearch-data:
networks:
elk:
driver: bridge
name: elk