-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
589 lines (562 loc) · 15.3 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
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
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
version: '2.1'
services:
nginx:
container_name: nginx
image: nginx:1.11-alpine
restart: always
ports:
- "80:80"
- "443-446:443-446"
- "8081:8081"
- "8888:8888"
- "9000:9000"
command: /bin/sh -c "nginx -g 'daemon off;'"
env_file:
- ${STCS_CONFIG_FOLDER-./../config}/global.env
- ${STCS_CONFIG_FOLDER-./../config}/nginx/config.env
environment:
USER_NAME: nginx
volumes:
# nginx config files
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/http.conf:/etc/nginx/http.conf
- ${STCS_CONFIG_FOLDER-./../config}/nginx/conf.d:/etc/nginx/conf.d
# password files
- ${STCS_CONFIG_FOLDER-./../config}/nginx/htpasswd:/etc/nginx/htpasswd
# certificates
- ${STCS_CONFIG_FOLDER-./../config}/nginx/certs/server.crt:/etc/nginx/certs/server.crt
- ${STCS_CONFIG_FOLDER-./../config}/nginx/certs/server.key:/etc/nginx/certs/server.key
# static_html
- ./static_html:/var/www
- ${STCS_CONFIG_FOLDER-./../config}/static_html/config/config.js:/var/www/config/config.js
networks:
default:
jupyter-notebook:
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
portainer:
container_name: portainer
image: portainer/portainer
restart: always
privileged: true
env_file:
- ${STCS_CONFIG_FOLDER-./../config}/global.env
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- portainer-data:/data
networks:
default:
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
zookeeper:
container_name: zookeeper
image: biggis/zookeeper:3.4.6
restart: always
hostname: zookeeper
ports:
- "2181:2181"
env_file:
- ${STCS_CONFIG_FOLDER-./../config}/global.env
environment:
USER_NAME: zookeeper
volumes:
- zookeeper-data:/tmp/zookeeper/data
networks:
default:
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
kafka:
container_name: kafka
image: biggis/kafka:0.10.1.1
restart: always
hostname: kafka
ports:
- "9092:9092"
depends_on:
zookeeper:
condition: service_healthy
env_file:
- ${STCS_CONFIG_FOLDER-./../config}/global.env
- ${STCS_CONFIG_FOLDER-./../config}/kafka/config.env
environment:
USER_NAME: kafka
volumes:
- kafka-data:/tmp/kafka/data
networks:
default:
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
kafka-manager:
container_name: kafka-manager
image: sheepkiller/kafka-manager
hostname: kafka-manager
restart: always
depends_on:
kafka:
condition: service_healthy
environment:
APPLICATION_SECRET: letmein
ZK_HOSTS: "zookeeper:2181"
KM_VERSION: 1.3.3.6
env_file:
- ${STCS_CONFIG_FOLDER-./../config}/global.env
networks:
default:
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
schema-registry:
container_name: schema-registry
image: confluentinc/cp-schema-registry:latest
hostname: schema-registry
restart: always
ports:
- "8082:8082"
environment:
USER_NAME: schema-registry
SCHEMA_REGISTRY_LISTENERS: "http://0.0.0.0:8082"
SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL: "zookeeper:2181"
SCHEMA_REGISTRY_HOST_NAME: "0.0.0.0"
# todo ADD HEALTHCHECK
depends_on:
kafka:
condition: service_healthy
env_file:
- ${STCS_CONFIG_FOLDER-./../config}/global.env
networks:
default:
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
postgres:
container_name: postgres
image: biggis/postgres:9.6
restart: always
hostname: postgres
ports:
- "5432:5432"
env_file:
- ${STCS_CONFIG_FOLDER-./../config}/global.env
- ${STCS_CONFIG_FOLDER-./../config}/postgres/config.env
environment:
USER_NAME: postgres
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- postgres-data:/var/lib/postgresql/data/pgdata
- ${STCS_CONFIG_FOLDER-./../config}/postgres/postgresql.conf:/var/lib/postgresql/data/pgdata/postgresql.conf
networks:
default:
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
pgadmin:
container_name: pgadmin
image: fenglc/pgadmin4:1.4
restart: always
hostname: pgadmin4
env_file:
- ${STCS_CONFIG_FOLDER-./../config}/global.env
environment:
USER_NAME: pgadmin
PORT: 5050
volumes:
- pgadmin-data:/root/.pgadmin
networks:
default:
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
jupyter-notebook:
container_name: jupyter-notebook
image: smueller18/stcs:anaconda3
restart: always
hostname: jupyter-notebook
env_file:
- ${STCS_CONFIG_FOLDER-./../config}/global.env
volumes:
- jupyter-notebook-data:/opt/notebooks
networks:
jupyter-notebook:
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
consumer-postgres:
container_name: consumer-postgres
image: smueller18/stcs:python3
restart: always
hostname: consumer-postgres
depends_on:
kafka:
condition: service_healthy
postgres:
condition: service_healthy
# schema-registry:
# condition: service_healthy
env_file:
- ${STCS_CONFIG_FOLDER-./../config}/global.env
- ${STCS_CONFIG_FOLDER-./../config}/consumer/postgres/config.env
environment:
USER_NAME: consumer-postgres
command: ["python", "/opt/consumer.py"]
volumes:
- ./consumer/postgres:/opt
networks:
default:
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
consumer-rest-api:
container_name: consumer-rest-api
image: smueller18/stcs:python3
restart: always
hostname: consumer-rest-api
depends_on:
kafka:
condition: service_healthy
# schema-registry:
# condition: service_healthy
env_file:
- ${STCS_CONFIG_FOLDER-./../config}/global.env
- ${STCS_CONFIG_FOLDER-./../config}/consumer/rest-api/config.env
environment:
USER_NAME: consumer-rest-api
command: ["python", "/opt/consumer.py"]
volumes:
- ./static_html/css:/opt/static/css
- ./static_html/img:/opt/static/img
- ./static_html/js:/opt/static/js
- ./consumer/rest-api:/opt
networks:
default:
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
consumer-socketio:
container_name: consumer-socketio
image: smueller18/stcs:python3
restart: always
hostname: consumer-socketio
depends_on:
kafka:
condition: service_healthy
# schema-registry:
# condition: service_healthy
env_file:
- ${STCS_CONFIG_FOLDER-./../config}/global.env
- ${STCS_CONFIG_FOLDER-./../config}/consumer/socketio/config.env
environment:
USER_NAME: consumer-socktio
command: ["python", "/opt/consumer.py"]
volumes:
- ./static_html/css:/opt/static/css
- ./static_html/img:/opt/static/img
- ./static_html/js:/opt/static/js
- ./consumer/socketio:/opt
networks:
default:
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
consumer-machine-state-prediction:
container_name: consumer-machine-state-prediction
image: smueller18/stcs:python3
restart: always
hostname: consumer-machine-state-prediction
depends_on:
kafka:
condition: service_healthy
# schema-registry:
# condition: service_healthy
env_file:
- ${STCS_CONFIG_FOLDER-./../config}/global.env
- ${STCS_CONFIG_FOLDER-./../config}/consumer/machine-state-prediction/config.env
environment:
USER_NAME: consumer-machine-state-prediction
command: ["python", "/opt/consumer.py"]
volumes:
- ./consumer/machine-state-prediction:/opt
- ${STCS_CONFIG_FOLDER-./../config}/consumer/machine-state-prediction/data:/opt/data
networks:
default:
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
# producer-rolling-median:
# container_name: producer-rolling-median
# build: ./producer/rolling-median
# image: smueller18/producer:rolling-median
# restart: always
# hostname: producer-rolling-median
# env_file:
# - ${STCS_CONFIG_FOLDER-./../config}/global.env
# - ${STCS_CONFIG_FOLDER-./../config}/producer/rolling-median/config.env
# environment:
# USER_NAME: producer-rolling-median
# volumes:
# - ./avro/schema/kafka.timestamp-data.avsc:/avro/schema/kafka.timestamp-data.avsc
# networks:
# - default
# logging:
# driver: "json-file"
# options:
# max-size: "1m"
# max-file: "1"
producer-solar-radiation:
container_name: producer-solar-radiation
image: smueller18/stcs:python3
restart: always
hostname: producer-solar-radiation
depends_on:
kafka:
condition: service_healthy
# schema-registry:
# condition: service_healthy
env_file:
- ${STCS_CONFIG_FOLDER-./../config}/global.env
environment:
USER_NAME: producer-solar-radiation
command: ["python", "/opt/producer.py"]
volumes:
- ./producer/solar-radiation:/opt
networks:
default:
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
producer-mqtt-kafka-bridge:
container_name: producer-mqtt-kafka-bridge
image: smueller18/stcs:python3-mqtt
restart: always
hostname: producer-mqtt-kafka-bridge
depends_on:
kafka:
condition: service_healthy
env_file:
- ${STCS_CONFIG_FOLDER-./../config}/global.env
environment:
USER_NAME: producer-mqtt-kafka-bridge
command: ["python", "/opt/producer.py"]
volumes:
- ./producer/mqtt-kafka-bridge:/opt
networks:
default:
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
producer-weather-forecast-web:
container_name: producer-weather-forecast-web
image: smueller18/stcs:python3
restart: always
hostname: producer-weather-forecast-web
depends_on:
kafka:
condition: service_healthy
# schema-registry:
# condition: service_healthy
env_file:
- ${STCS_CONFIG_FOLDER-./../config}/global.env
- ${STCS_CONFIG_FOLDER-./../config}/producer/weather-forecast-web/config.env
environment:
USER_NAME: producer-weather-forecast-web
command: ["python", "/opt/producer.py"]
volumes:
- ${STCS_CONFIG_FOLDER-./../config}/producer/weather-forecast-web:/opt
networks:
default:
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
producer-pyranometer-huebsch-schule:
container_name: producer-pyranometer-huebsch-schule
image: smueller18/stcs:python3
restart: always
hostname: producer-pyranometer-huebsch-schule
depends_on:
kafka:
condition: service_healthy
# schema-registry:
# condition: service_healthy
env_file:
- ${STCS_CONFIG_FOLDER-./../config}/global.env
- ${STCS_CONFIG_FOLDER-./../config}/producer/pyranometer-huebsch-schule/config.env
environment:
USER_NAME: producer-pyranometer-huebsch-schule
command: ["python", "/opt/producer.py"]
volumes:
- ${STCS_CONFIG_FOLDER-./../config}/producer/pyranometer-huebsch-schule:/opt
networks:
default:
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
producer-thermometer-huebsch-schule:
container_name: producer-thermometer-huebsch-schule
image: smueller18/stcs:python3
restart: always
hostname: producer-thermometer-huebsch-schule
depends_on:
kafka:
condition: service_healthy
# schema-registry:
# condition: service_healthy
env_file:
- ${STCS_CONFIG_FOLDER-./../config}/global.env
- ${STCS_CONFIG_FOLDER-./../config}/producer/thermometer-huebsch-schule/config.env
environment:
USER_NAME: producer-thermometer-huebsch-schule
command: ["python", "/opt/producer.py"]
volumes:
- ${STCS_CONFIG_FOLDER-./../config}/producer/thermometer-huebsch-schule:/opt
networks:
default:
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
producer-adsorption-cooling-machine:
container_name: producer-adsorption-cooling-machine
image: smueller18/stcs:python2
restart: always
hostname: producer-adsorption-cooling-machine
depends_on:
kafka:
condition: service_healthy
# schema-registry:
# condition: service_healthy
env_file:
- ${STCS_CONFIG_FOLDER-./../config}/global.env
# - ${STCS_CONFIG_FOLDER-./../config}/producer/adsorption-cooling-machine/config.env
environment:
USER_NAME: producer-adsorption-cooling-machine
command: ["python", "/opt/producer.py"]
volumes:
- ${STCS_CONFIG_FOLDER-./../config}/producer/adsorption-cooling-machine:/opt
networks:
default:
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
flink-jobmanager:
container_name: flink-jobmanager
image: biggis/flink:1.3.0
restart: always
hostname: flink-jobmanager
depends_on:
kafka:
condition: service_healthy
ports:
- "6123:6123"
command: docker-entrypoint.sh jobmanager
env_file:
- ${STCS_CONFIG_FOLDER-./../config}/global.env
environment:
JOB_MANAGER_RPC_ADDRESS: flink-jobmanager
USER_NAME: flink
networks:
default:
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
flink-taskmanager:
container_name: flink-taskmanager
image: biggis/flink:1.3.0
restart: always
hostname: flink-taskmanager
depends_on:
- flink-jobmanager
command: docker-entrypoint.sh taskmanager
env_file:
- ${STCS_CONFIG_FOLDER-./../config}/global.env
environment:
JOB_MANAGER_RPC_ADDRESS: flink-jobmanager
USER_NAME: flink
networks:
default:
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
mosquitto:
container_name: mosquitto
image: eclipse-mosquitto:1.4.10
restart: always
hostname: mosquitto
ports:
- "1883:1883"
env_file:
- ${STCS_CONFIG_FOLDER-./../config}/global.env
volumes:
- mosquitto-data:/mosquitto/data
- ${STCS_CONFIG_FOLDER-./../config}/mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf
networks:
default:
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
networks:
default:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.20.0.0/24
jupyter-notebook:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.20.1.0/24
volumes:
zookeeper-data:
kafka-data:
postgres-data:
pgadmin-data:
jupyter-notebook-data:
portainer-data:
mosquitto-data: