-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-ditto.yml
277 lines (266 loc) · 11.2 KB
/
docker-compose-ditto.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
# Copyright (c) 2019 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0
#
# SPDX-License-Identifier: EPL-2.0
version: '2.4'
services:
mongodb:
image: docker.io/mongo:4.2
mem_limit: 256m
restart: always
# network_mode: host
networks:
default:
aliases:
- mongodb
command: mongod --storageEngine wiredTiger --noscripting
user: mongodb
ports:
- 27017:27017
environment:
TZ: Europe/Berlin
policies:
image: docker.io/eclipse/ditto-policies:${DITTO_VERSION:-latest}
mem_limit: 512m
restart: always
# network_mode: host
networks:
default:
aliases:
- ditto-cluster
environment:
- TZ=Europe/Berlin
- BIND_HOSTNAME=0.0.0.0
- JAVA_TOOL_OPTIONS=-XX:ActiveProcessorCount=2 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dakka.coordinated-shutdown.exit-jvm=on -Dakka.cluster.shutdown-after-unsuccessful-join-seed-nodes=180s -Dakka.cluster.failure-detector.threshold=15.0 -Dakka.cluster.failure-detector.expected-response-after=10s -Dakka.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dakka.cluster.downing-provider-class=
- MONGO_DB_HOSTNAME=mongodb
# in order to write logs into a file you can enable this by setting the following env variable
# the log file(s) can be found in /var/log/ditto directory on the host machine
# - DITTO_LOGGING_FILE_APPENDER=true
# Set additional configuration options here
# -Dditto.policies...
#command: java -jar starter.jar
# only needed if DITTO_LOGGING_FILE_APPENDER is set
# volumes:
# - ditto_log_files:/var/log/ditto
healthcheck:
test: curl --fail `hostname`:8558/alive || exit 1
interval: 30s
timeout: 15s
retries: 4
start_period: 120s
things:
image: docker.io/eclipse/ditto-things:${DITTO_VERSION:-latest}
mem_limit: 512m
restart: always
# network_mode: host
networks:
default:
aliases:
- ditto-cluster
depends_on:
- policies
environment:
- TZ=Europe/Berlin
- BIND_HOSTNAME=0.0.0.0
- JAVA_TOOL_OPTIONS=-XX:ActiveProcessorCount=2 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dakka.coordinated-shutdown.exit-jvm=on -Dakka.cluster.shutdown-after-unsuccessful-join-seed-nodes=180s -Dakka.cluster.failure-detector.threshold=15.0 -Dakka.cluster.failure-detector.expected-response-after=10s -Dakka.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dakka.cluster.downing-provider-class=
- MONGO_DB_HOSTNAME=mongodb
# in order to write logs into a file you can enable this by setting the following env variable
# the log file(s) can be found in /var/log/ditto directory on the host machine
# - DITTO_LOGGING_FILE_APPENDER=true
# Set additional configuration options here
# -Dditto.things...
#command: java -jar starter.jar
# only needed if DITTO_LOGGING_FILE_APPENDER is set
# volumes:
# - ditto_log_files:/var/log/ditto
healthcheck:
test: curl --fail `hostname`:8558/alive || exit 1
interval: 30s
timeout: 15s
retries: 4
start_period: 120s
things-search:
image: docker.io/eclipse/ditto-things-search:${DITTO_VERSION:-latest}
mem_limit: 512m
restart: always
# network_mode: host
networks:
default:
aliases:
- ditto-cluster
depends_on:
- policies
environment:
- TZ=Europe/Berlin
- BIND_HOSTNAME=0.0.0.0
- JAVA_TOOL_OPTIONS=-XX:ActiveProcessorCount=2 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dakka.coordinated-shutdown.exit-jvm=on -Dakka.cluster.shutdown-after-unsuccessful-join-seed-nodes=180s -Dakka.cluster.failure-detector.threshold=15.0 -Dakka.cluster.failure-detector.expected-response-after=10s -Dakka.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dakka.cluster.downing-provider-class=
- MONGO_DB_HOSTNAME=mongodb
# in order to write logs into a file you can enable this by setting the following env variable
# the log file(s) can be found in /var/log/ditto directory on the host machine
# - DITTO_LOGGING_FILE_APPENDER=true
# Set additional configuration options here
# -Dditto.things-search...
#command: java -jar starter.jar
# only needed if DITTO_LOGGING_FILE_APPENDER is set
# volumes:
# - ditto_log_files:/var/log/ditto
healthcheck:
test: curl --fail `hostname`:8558/alive || exit 1
interval: 30s
timeout: 15s
retries: 4
start_period: 120s
concierge:
image: docker.io/eclipse/ditto-concierge:${DITTO_VERSION:-latest}
mem_limit: 512m
restart: always
# network_mode: host
networks:
default:
aliases:
- ditto-cluster
depends_on:
- policies
environment:
- TZ=Europe/Berlin
- BIND_HOSTNAME=0.0.0.0
- JAVA_TOOL_OPTIONS=-XX:ActiveProcessorCount=2 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dakka.coordinated-shutdown.exit-jvm=on -Dakka.cluster.shutdown-after-unsuccessful-join-seed-nodes=180s -Dakka.cluster.failure-detector.threshold=15.0 -Dakka.cluster.failure-detector.expected-response-after=10s -Dakka.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dakka.cluster.downing-provider-class=
- MONGO_DB_HOSTNAME=mongodb
# in order to write logs into a file you can enable this by setting the following env variable
# the log file(s) can be found in /var/log/ditto directory on the host machine
# - DITTO_LOGGING_FILE_APPENDER=true
# Set additional configuration options here
# -Dditto.concierge...
#command: java -jar starter.jar
# only needed if DITTO_LOGGING_FILE_APPENDER is set
# volumes:
# - ditto_log_files:/var/log/ditto
healthcheck:
test: curl --fail `hostname`:8558/alive || exit 1
interval: 30s
timeout: 15s
retries: 4
start_period: 120s
connectivity:
image: docker.io/eclipse/ditto-connectivity:${DITTO_VERSION:-latest}
mem_limit: 768m
restart: always
# network_mode: host
networks:
default:
aliases:
- ditto-cluster
depends_on:
- policies
- concierge
environment:
- TZ=Europe/Berlin
- BIND_HOSTNAME=0.0.0.0
# if connections to rabbitmq broker are used, you might want to disable ExitOnOutOfMemoryError, because the amqp-client has a bug throwing OOM exceptions and causing a restart loop
- JAVA_TOOL_OPTIONS=-XX:ActiveProcessorCount=2 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dakka.coordinated-shutdown.exit-jvm=on -Dakka.cluster.shutdown-after-unsuccessful-join-seed-nodes=180s -Dakka.cluster.failure-detector.threshold=15.0 -Dakka.cluster.failure-detector.expected-response-after=10s -Dakka.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dakka.cluster.downing-provider-class=
- MONGO_DB_HOSTNAME=mongodb
# in order to write logs into a file you can enable this by setting the following env variable
# the log file(s) can be found in /var/log/ditto directory on the host machine
# - DITTO_LOGGING_FILE_APPENDER=true
# Set additional configuration options here
# -Dditto.connectivity...
#command: java -jar starter.jar
# only needed if DITTO_LOGGING_FILE_APPENDER is set
#volumes:
# - ditto_log_files:/var/log/ditto
healthcheck:
test: curl --fail `hostname`:8558/alive || exit 1
interval: 30s
timeout: 15s
retries: 4
start_period: 120s
gateway:
image: docker.io/eclipse/ditto-gateway:${DITTO_VERSION:-latest}
mem_limit: 512m
restart: always
# network_mode: host
networks:
default:
aliases:
- ditto-cluster
depends_on:
- policies
- concierge
ports:
- "8081:8080"
environment:
- TZ=Europe/Berlin
- BIND_HOSTNAME=0.0.0.0
- ENABLE_PRE_AUTHENTICATION=true
- JAVA_TOOL_OPTIONS=-XX:ActiveProcessorCount=2 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dakka.coordinated-shutdown.exit-jvm=on -Dakka.cluster.shutdown-after-unsuccessful-join-seed-nodes=180s -Dakka.cluster.failure-detector.threshold=15.0 -Dakka.cluster.failure-detector.expected-response-after=10s -Dakka.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dakka.cluster.downing-provider-class=
# in order to write logs into a file you can enable this by setting the following env variable
# the log file(s) can be found in /var/log/ditto directory on the host machine
# - DITTO_LOGGING_FILE_APPENDER=true
# You may use the environment for setting the devops password
#- DEVOPS_PASSWORD=foobar
# Set additional configuration options here
# -Dditto.gateway...
# Setting the devops password via java VM environment
#command: java -Dditto.gateway.authentication.devops.password=foobar -jar starter.jar
# only needed if DITTO_LOGGING_FILE_APPENDER is set
# volumes:
# - ditto_log_files:/var/log/ditto
healthcheck:
test: curl --fail `hostname`:8558/alive || exit 1
interval: 30s
timeout: 15s
retries: 4
start_period: 120s
swagger-ui:
image: docker.io/swaggerapi/swagger-ui:v4.6.1
mem_limit: 32m
restart: always
environment:
- QUERY_CONFIG_ENABLED=true
# network_mode: host
volumes:
- ../../documentation/src/main/resources/openapi:/usr/share/nginx/html/openapi:ro
- ../../documentation/src/main/resources/images:/usr/share/nginx/html/images:ro
- ./swagger3-index.html:/usr/share/nginx/html/index.html:ro
command: nginx -g 'daemon off;'
nginx:
image: docker.io/nginx:1.21-alpine
mem_limit: 32m
restart: always
# network_mode: host
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx.htpasswd:/etc/nginx/nginx.htpasswd:ro
- ./nginx-cors.conf:/etc/nginx/nginx-cors.conf:ro
- ./index.html:/etc/nginx/html/index.html:ro
- ../../documentation/src/main/resources/images:/etc/nginx/html/images:ro
ports:
- "${DITTO_EXTERNAL_PORT:-8080}:80"
depends_on:
- gateway
- swagger-ui
mosquitto:
image: eclipse-mosquitto:1.6
restart: always
#volumes:
# - ./:/mosquitto/:rw
#networks:
# default:
# aliases:
# - ditto-cluster
ports:
- 1883:1883
- 9001:9001
volumes:
ditto_log_files:
driver: local
driver_opts:
type: none
device: /var/log/ditto
o: bind,uid=1000,gid=1000