-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
317 lines (312 loc) · 7.68 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
version: "3.8"
services:
api:
image: cacao_api
build:
args:
# If the following argument is defined during BUILD, will try to use a local repository as proxy
# - USE_PROXY
- DONT_USE_PROXY
context: ./
dockerfile: ./api/Dockerfile
network: host
plugin_account:
image: cacao_plugin_account
build:
args:
# If the following argument is defined during BUILD, will try to use a local repository as proxy
# - USE_PROXY
- DONT_USE_PROXY
context: ./
dockerfile: ./account/Dockerfile
network: host
depends_on:
- api
eureka:
container_name: eureka
build:
args:
# If the following argument is defined during BUILD, will try to use a local repository as proxy
# - USE_PROXY
- DONT_USE_PROXY
context: ./
dockerfile: ./eureka/Dockerfile
network: host
environment:
- PORT=8761
- "WEB_JVM_OPTS=-Xmx512m"
# ports:
# - "8761:8761"
volumes:
- logdir_eureka:/var/log
restart: always
web:
container_name: web
hostname: 'web'
build:
args:
# If the following argument is defined during BUILD, will try to use a local repository as proxy
# - USE_PROXY
- DONT_USE_PROXY
context: ./
dockerfile: ./web/Dockerfile
network: host
environment:
- PORT=8080
- "WEB_JVM_OPTS=-Xms4g -Xmx4g"
# ports:
# - "8080:8080"
depends_on:
- api
- plugin_account
- es01
- es02
- es03
- kibana
- kafka
- eureka
volumes:
- logdir_web:/var/log
- web_settings:/home/usr/app/.cacao
- ./app_config_web:/app_config.properties:ro
- file-storage:/var/cacao
configs:
- app_config_web
restart: always
validator:
container_name: validator
hostname: 'validator'
build:
args:
# If the following argument is defined during BUILD, will try to use a local repository as proxy
# - USE_PROXY
- DONT_USE_PROXY
context: ./
dockerfile: ./validator/Dockerfile
network: host
environment:
- PORT=8081
- "WEB_JVM_OPTS=-Xms2g -Xmx2g"
# ports:
# - "8081:8081"
depends_on:
- api
- plugin_account
- es01
- es02
- es03
- kafka
- eureka
volumes:
- logdir_validator:/var/log
- ./app_config_validator:/app_config.properties:ro
- file-storage:/var/cacao:ro
configs:
- app_config_validator
restart: always
etl:
container_name: etl
hostname: 'etl'
build:
args:
# If the following argument is defined during BUILD, will try to use a local repository as proxy
# - USE_PROXY
- DONT_USE_PROXY
context: ./
dockerfile: ./etl/Dockerfile
network: host
environment:
- PORT=8082
- "WEB_JVM_OPTS=-Xms2g -Xmx2g"
# ports:
# - "8082:8082"
depends_on:
- api
- plugin_account
- es01
- es02
- es03
- kafka
- eureka
volumes:
- logdir_etl:/var/log
- ./app_config_etl:/app_config.properties:ro
- file-storage:/var/cacao:ro
configs:
- app_config_etl
restart: always
es01:
container_name: es01
hostname: 'es01'
build:
context: ./es
environment:
- PORT=9200
- NODE_NAME=es01
- CLUSTER_NAME=es-docker-cluster
- SEED_HOSTS=es02,es03
- MASTER_NODES=es01,es02,es03
ulimits:
memlock:
soft: -1
hard: -1
# ports:
# - "9200:9200"
# - "9300:9300"
volumes:
- es-data:/usr/share/elasticsearch/data
- es-conf:/usr/share/elasticsearch/config
- ./conf/es.yml:/usr/share/elasticsearch/config/elasticsearch.yml
- ./conf/es.mem.options:/usr/share/elasticsearch/config/jvm.options.d/es.mem.options
- ./conf/es.misc.options:/usr/share/elasticsearch/config/jvm.options.d/es.misc.options
restart: always
es02:
container_name: es02
hostname: 'es02'
build:
context: ./es
environment:
- PORT=9200
- NODE_NAME=es02
- CLUSTER_NAME=es-docker-cluster
- SEED_HOSTS=es01,es03
- MASTER_NODES=es01,es02,es03
ulimits:
memlock:
soft: -1
hard: -1
# ports:
# - "9201:9200"
# - "9301:9300"
volumes:
- es-data2:/usr/share/elasticsearch/data
- es-conf2:/usr/share/elasticsearch/config
- ./conf/es.yml:/usr/share/elasticsearch/config/elasticsearch.yml
- ./conf/es.mem.options:/usr/share/elasticsearch/config/jvm.options.d/es.mem.options
- ./conf/es.misc.options:/usr/share/elasticsearch/config/jvm.options.d/es.misc.options
restart: always
es03:
container_name: es03
hostname: 'es03'
build:
context: ./es
environment:
- PORT=9200
- NODE_NAME=es03
- CLUSTER_NAME=es-docker-cluster
- SEED_HOSTS=es01,es02
- MASTER_NODES=es01,es02,es03
ulimits:
memlock:
soft: -1
hard: -1
# ports:
# - "9202:9200"
# - "9302:9300"
volumes:
- es-data3:/usr/share/elasticsearch/data
- es-conf3:/usr/share/elasticsearch/config
- ./conf/es.yml:/usr/share/elasticsearch/config/elasticsearch.yml
- ./conf/es.mem.options:/usr/share/elasticsearch/config/jvm.options.d/es.mem.options
- ./conf/es.misc.options:/usr/share/elasticsearch/config/jvm.options.d/es.misc.options
restart: always
kibana:
container_name: kibana
build:
context: ./kibana
environment:
- PORT=5601
- ESPORT=9200
- "NODE_OPTIONS=--max-old-space-size=4096"
- SERVER_NAME=kibana
- ES_HOSTS=["https://es01:9200","https://es02:9200","https://es03:9200"]
- URL=${URL}
# ports:
# - "5601:5601"
volumes:
- kibana-conf:/usr/share/kibana/config
depends_on:
- es01
- es02
- es03
restart: always
zookeeper:
image: confluentinc/cp-zookeeper:latest
container_name: zookeeper
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
# ports:
# - 22181:2181
healthcheck:
test: ["CMD-SHELL", "echo ruok | nc -w 2 zookeeper 4444"]
interval: 5s
timeout: 10s
retries: 3
restart: always
kafka:
image: confluentinc/cp-kafka:latest
container_name: kafka01
depends_on:
- zookeeper
# healthcheck:
# test: ["CMD-SHELL", "kafka-topics.sh --bootstrap-server 127.0.0.1:9092 --topic files-to-validate --describe"]
# ports:
# - 29092:29092
# - 9092:9092
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://kafka:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
restart: always
proxy:
container_name: proxy
build:
context: ./proxy
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/London
- URL=${URL}
- SUBDOMAINS=
# - VALIDATION=http
- VALIDATION=duckdns
- DUCKDNSTOKEN=${DUCKDNSTOKEN}
cap_add:
- NET_ADMIN
ports:
- "80:80"
- "443:443"
depends_on:
- web
restart: always
volumes:
es-data:
driver: local
es-conf:
driver: local
es-data2:
driver: local
es-conf2:
driver: local
es-data3:
driver: local
es-conf3:
driver: local
kibana-conf:
driver: local
logdir_web:
driver: local
logdir_validator:
driver: local
logdir_etl:
driver: local
logdir_eureka:
driver: local
file-storage:
driver: local
web_settings:
driver: local