-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
329 lines (314 loc) · 12 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
version: '3.7'
services:
# RabbitMQ
rabbit:
container_name: hldf_docker_rabbit_${ENVTYPE}
hostname: hldf_rabbit_${ENVTYPE}
image: rabbitmq:latest
networks:
- monica_hldfad_net
environment:
# remind that if you want to enable the admin console, accessible
# from localhost:15672, you must type the following command
# 'rabbitmq-plugins enable rabbitmq_management' into the rabbit container
RABBITMQ_DEFAULT_USER: ${RABBITMQ_USER}
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_PASS}
RABBITMQ_DEFAULT_VHOST: /
RABBITMQ_LOG_BASE: /var/log/rabbitmq
RABBITMQ_HOSTNAME: rabbit_${ENVTYPE}
ports:
- "${RABBITMQ_DOCKER_PORT_DIAGNOSTIC}:5672" # we forward this port because it's useful for debugging
- "${RABBITMQ_DOCKER_PORT_SERVICE}:15672" # hre, we can access rabbitmq management plugin
#Celery hldfad_worker
hldfad_worker:
container_name: hldf_docker_celery_worker_${ENVTYPE}
hostname: hldf_host_celery_worker_${ENVTYPE}
image: monicaproject/hldfad_worker:02.06.01.08-alpine
restart: always
#image: hldfad_worker:latest
volumes:
# - ./monica:/code
- ./volumes/monica_celery/logs:/logs
- ./volumes/monica_celery/appconfig:/appconfig
- ./volumes/monica_celery/var/run/celery:/var/run/celery
networks:
- monica_hldfad_net
environment:
ENV_SELECT_DB_TYPE: ${V_ARG_DATABASETYPE}
DJANGO_SETTINGS_MODULE: shared.settings.appglobalconf
DB_PORT_5432_TCP_ADDR: ${PGSQL_WORKER_HOST}
DB_PORT_5432_TCP_PORT: ${PGSQL_WORKER_PORT}
DB_USER: ${PGSQL_WORKER_USER}
DB_PASSWORD: ${PGSQL_WORKER_PASSWORD}
DB_NAME: ${PGSQL_WORKER_DATABASE}
RABBITMQ_DEFAULT_USER: ${RABBITMQ_USER}
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_PASS}
RABBITMQ_HOSTNAME: rabbit
RABBITMQ_PORT: 5672
CACHEREDIS_DEFAULT_HOSTNAME: redis
CACHEREDIS_DEFAULT_PORT: 6379
ENV_MQTT_OBSERVATION_URL: ${V_ENV_MQTT_OBSERVATION_URL}
ENV_CATALOG_PORT: ${V_ENV_CATALOG_PORT}
ENV_WEB_BASE_URL: ${V_ENV_WEB_BASE_URL}
ENV_MQTT_OBSERVATION_PORT: ${V_ENV_MQTT_OBSERVATION_PORT}
ENV_CATALOG_USERNAME: ${V_ENV_CATALOG_USERNAME}
ENV_CATALOG_PASSWORD: ${V_ENV_CATALOG_PASSWORD}
MOSQUITTO_USERNAME: ${MOSQUITTO_USERNAME_VALUE}
MOSQUITTO_PASSWORD: ${MOSQUITTO_PASSWORD_VALUE}
WP6_CATALOG_CONNECTIONURL: ${V_WP6_CATALOG_CONNECTIONURL}
WP6_CATALOG_CONNECTIONPORT: ${V_WP6_CATALOG_CONNECTIONPORT}
OUTPUT_MQTTBROKER_USERNAME: ${V_OUTPUT_MQTTBROKER_USERNAME}
OUTPUT_MQTTBROKER_PASSWORD: ${V_OUTPUT_MQTTBROKER_PASSWORD}
CONFENVIRONMENT_GLOBALINFO: ${V_CONFENVIRONMENT_GLOBALINFO}
CONFENVIRONMENT_DEBUG: ${V_CONFENVIRONMENT_DEBUG}
CONFENVIRONMENT_DEBUGTEMPLATE: ${V_CONFENVIRONMENT_DEBUGTEMPLATE}
APPSETTING_MONITORINGAREA_LATITUDE: ${V_APPSETTING_MONITORINGAREA_LATITUDE}
APPSETTING_MONITORINGAREA_LONGITUDE: ${V_APPSETTING_MONITORINGAREA_LONGITUDE}
APPSETTING_MONITORINGAREA_HORIZONTALSIZE_M: ${V_APPSETTING_MONITORINGAREA_HORIZONTALSIZE_M}
APPSETTING_MONITORINGAREA_CELLSIZE_M: ${V_APPSETTING_MONITORINGAREA_CELLSIZE_M}
APPSETTING_MONITORINGAREA_VERTICALSIZE_M: ${V_APPSETTING_MONITORINGAREA_VERTICALSIZE_M}
APPSETTING_INTERVAL_OBS_VALIDITY_SECS: ${V_APPSETTING_INTERVAL_OBS_VALIDITY_SECS}
APPSETTING_ENABLE_EMPTY_CROWD_HEATMAP: ${V_APPSETTING_ENABLE_EMPTY_CROWD_HEATMAP}
APPSETTING_ENABLE_RANDOM_OUTPUT: ${V_APPSETTING_ENABLE_RANDOM_OUTPUT}
APPSETTING_ENABLE_RANDOM_QUEUEDETECTIONALERT: ${V_APPSETTING_ENABLE_RANDOM_QUEUEDETECTIONALERT}
APPSETTING_ENABLE_RANDOM_DENSITYMATRIX: ${V_APPSETTING_ENABLE_RANDOM_DENSITYMATRIX}
APPSETTING_ENABLE_RANDOM_FAKEQUEUEDETECTION: ${V_APPSETTING_ENABLE_RANDOM_FAKEQUEUEDETECTION}
APPSETTING_OBSERVATION_DEBUG_INTERVALNUMBERNOTIFICATION: ${V_APPSETTING_OBSERVATION_DEBUG_INTERVALNUMBERNOTIFICATION}
APPSETTING_TASK_ELABORATION_FREQ_SECS: ${V_APPSETTING_TASK_ELABORATION_FREQ_SECS}
APPSETTING_TASK_ALIVEAPP_FREQ_SECS: ${V_APPSETTING_TASK_ALIVEAPP_FREQ_SECS}
APPSETTING_ENABLE_OBS_IOTIDRETRIEVE: ${V_APPSETTING_ENABLE_OBS_IOTIDRETRIEVE}
APPSETTING_GOST_NAME: ${V_APPSETTING_GOST_NAME}
APPSETTINGS_ENABLE_IMMEDIATEELABORATION_FEEDBYNUMBEROBS: ${V_APPSETTINGS_ENABLE_IMMEDIATEELABORATION_FEEDBYNUMBEROBS}
APPSETTING_MINIMUM_ACCEPTWRISTBAND_START: ${V_COUNT_WRISTBANDS}
links:
- rabbit
- redis
- mqttbroker
- dashboard
depends_on:
- rabbit
- redis
- scral
- mqttbroker
- dashboard
redis:
container_name: hldf_docker_cache_redis_${ENVTYPE}
hostname: hldf_host_cache_redis_${ENVTYPE}
image: redis:latest
sysctls:
net.core.somaxconn: 1024
ports:
- '${REDISCACHE_PORT}:6379'
networks:
- monica_hldfad_net
# GOST
node-red:
container_name: gost-node-red_${ENVTYPE}
image: nodered/node-red-docker:slim-v8
volumes:
- nodered:/data
ports:
- "1880:1880"
networks:
- monica_hldfad_net
mqttbroker:
container_name: gost-mqttbroker-${ENVTYPE}
image: toke/mosquitto
volumes:
- mosquitto_data:/mqtt/data
- mosquitto_conf:/mqtt/config:ro
ports:
- "${MOSQUITTO_EXPOSED_PORT_SERVICE}:1883"
- "${MOSQUITTO_EXPOSED_PORT_DIAGNOSTIC}:9001"
networks:
- monica_hldfad_net
gost-db:
container_name: gost-db_${ENVTYPE}
image: geodan/gost-db
volumes:
- postgis:/var/lib/postgresql/data
environment:
POSTGRES_DB: gost
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
networks:
- monica_hldfad_net
gost:
container_name: gost-gostreal_${ENVTYPE}
image: geodan/gost
volumes:
- gost_conf:/gostserver/config
depends_on:
- mqttbroker
- gost-db
environment:
GOST_DB_HOST: gost-db
GOST_MQTT_HOST: mqttbroker
networks:
- monica_hldfad_net
dashboard:
container_name: gost_dashboard_${ENVTYPE}
image: geodan/gost-dashboard
ports:
- "8080:8080"
depends_on:
- gost
networks:
- monica_hldfad_net
# SCRAL
scral:
image: monicaproject/scral:wristband_mqtt_v2
container_name: "SCRAL-wb-MQTT_${ENVTYPE}"
ports:
- "8000:8000"
depends_on:
- dashboard
- gost
- mqttbroker
restart: on-failure
environment:
### Necessary to enable other env variables
CONFIG: "custom"
# MODULE_NAME: "SCRAL"
# ENDPOINT_URL: "localhost"
# ENDPOINT_PORT: 8000
PUB_BROKER_URI: mqttbroker
PUB_BROKER_PORT: 1883
# PUB_BROKER_KEEPALIVE: 60
# GOST_MQTT_PREFIX: GOST/
# OGC_SERVER_ADDRESS: http://localhost:8080/v1.0
OGC_SERVER_ADDRESS: http://dashboard:8080/v1.0
# OGC_SERVER_USER: "scral"
# OGC_SERVER_PASS: "password"
# LISTENING_ADDRESS: "0.0.0.0"
# LISTENING_PORT: 8000
VERBOSE: 1
# UPDATE_INTERVAL: 60
### only for module with MQTT resource manager
# SUB_BROKER_URI: "iot.hamburg.de"
SUB_BROKER_URI: mqttbroker
networks:
- monica_hldfad_net
#COP Things
simulator:
image: monicaproject/runsimulation:1.0
container_name: "simulator_${ENVTYPE}"
depends_on:
- dashboard
- mqttbroker
volumes:
- "./SimulatorControl.json:/app/SimulatorControl.json"
- "./db:/db"
environment:
MQTTServerAddress: mqttbroker
GOST: http://dashboard:8080/v1.0/
DatabasePath: "/db/"
SettingsFile: /app/SimulatorControl.json
networks:
- monica_hldfad_net
copupdaterCamera:
container_name: "COP_updater_camera_${ENVTYPE}"
image: "monicaproject/copupdater:0.6"
depends_on:
- mqttbroker
- gost
- copapi
environment:
- CONNECTION_STR=Host=copdb;Database=monica_wt2019;Username=postgres;Password=postgres;Port=5432
- GOST_PREFIX=GOST
- COP_AUTH_TOKEN=6ffdcacb-c485-499c-bce9-23f76d06aa36
- MONICA_THING_TYPE=Camera
- COP_API_BASE_PATH_HUB=http://copapi/
- COP_API_BASE_PATH=http://copapi/
- gostServer=http://gost:8080/v1.0/
- mqttServer=mqttbroker
- URL_PREFIX=
- ASPNETCORE_ENVIRONMENT=Development
- signalR=true
- aggregate=false
- MqttGostPrefix=GOST
- OGCSearch=true
networks:
- monica_hldfad_net
copdb:
container_name: "COP_DB_${ENVTYPE}"
image: "monicaproject/crowd-cop-db-with-camera:0.2"
ports:
- "9998:5432"
networks:
- monica_hldfad_net
copapi:
container_name: "COP_API_${ENVTYPE}"
image: "monicaproject/copapi:0.1"
ports:
- "8800:80"
depends_on:
- mqttbroker
- gost
- copdb
environment:
- MEDIA_PATH=wwwroot/ora_shared/
- CONNECTION_STR=Host=copdb;Database=monica_wt2019;Username=postgres;Password=postgres;Port=5432
- GOST_PREFIX=GOST
- TEST_TOKEN=6ffdcacb-c485-499c-bce9-23f76d06aa36
- USE_GOSTOBS=false
- GOST_SERVER=http://gost:8080/v1.0/
- URL_PREFIX=
- ASPNETCORE_ENVIRONMENT=Development
networks:
- monica_hldfad_net
copupdater:
container_name: "COP_updater_wb_${ENVTYPE}"
image: "monicaproject/copupdater:WristBand0.2"
depends_on:
- mqttbroker
- gost
- copapi
- copdb
environment:
- CONNECTION_STR=Host=copdb;Database=monica_wt2019;Username=postgres;Password=postgres;Port=5432
- GOST_PREFIX=GOST
- COP_AUTH_TOKEN=6ffdcacb-c485-499c-bce9-23f76d06aa36
- MONICA_THING_TYPE=PeopleHeatmap
- COP_API_BASE_PATH_HUB=http://copapi/
- COP_API_BASE_PATH=http://copapi/
- GOST_SERVER=http://gost:8080/v1.0/
- mqttServer=mqttbroker
- URL_PREFIX=
- ASPNETCORE_ENVIRONMENT=Development
- signalR=false
networks:
- monica_hldfad_net
copui:
container_name: "COP_UI_${ENVTYPE}"
image: "monicaproject/monica-cop-examples:crowd-with-camera"
ports:
- "8900:8080"
depends_on:
- mqttbroker
- gost
- copapi
- copdb
environment:
- CONNECTION_STR=Host=copdb;Database=monica_wt2019;Username=postgres;Password=postgres;Port=5432
- GOST_PREFIX=GOST
- COP_AUTH_TOKEN=6ffdcacb-c485-499c-bce9-23f76d06aa36
- MONICA_THING_TYPE=wearables UWB
- COP_API_BASE_PATH_HUB=http://copapi/
- COP_API_BASE_PATH=http://copapi/
- GOST_SERVER=http://gost:8080/v1.0/
- mqttServer=mqttbroker
- URL_PREFIX=
- ASPNETCORE_ENVIRONMENT=Development
- signalR=true
networks:
- monica_hldfad_net
networks:
monica_hldfad_net:
name: monica-globaltest-net-${ENVTYPE}
volumes:
postgis: {}
nodered: {}
gost_conf: {}
mosquitto_data: {}
mosquitto_conf: {}