-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
205 lines (191 loc) · 5.35 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
205 lines (191 loc) · 5.35 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
version: '3.4'
services:
db:
image: postgres:14.0-alpine
container_name: ${POSTGRES_DB_NAME}
restart: always
ports:
- 5432:5432
networks:
- mqtt-net
volumes:
# mount postgres config
- "./PostgreSQL/postgresql.conf:/etc/postgresql/postgresql.conf"
# mount initialization script
- "./PostgreSQL/sql-scripts:/docker-entrypoint-initdb.d"
# create/ mount data volume to persist data even when containers are not running
- db-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-h", "localhost", "-p", "5432"]
interval: 30s
timeout: 20s
retries: 3
start_period: 30s
environment:
POSTGRES_PASSWORD: pw
POSTGRES_USER: admin
POSTGRES_DB: kpis
pgadmin:
image: dpage/pgadmin4:6.1
container_name: pgadmin
restart: always
ports:
- 80:80
networks:
- mqtt-net
volumes:
# load server configuration
- "./pgAdmin/servers.json:/pgadmin4/servers.json"
healthcheck:
test: ["CMD", "wget", "-q", "--spider" ,"localhost:80"]
interval: 30s
timeout: 20s
retries: 3
start_period: 30s
environment:
PGADMIN_DEFAULT_EMAIL: test@test.de
PGADMIN_DEFAULT_PASSWORD: pw
grafana:
image: grafana/grafana:8.2.2
container_name: grafana
restart: always
ports:
- 3000:3000
networks:
- mqtt-net
volumes:
# mount grafana data volume
- grafana-data:/var/lib/grafana
# mount grafana logs volume
- grafana-logs:/var/log/grafana
# bind mount: datasources for provisioning
- ./Grafana/provisioning/datasources:/etc/grafana/provisioning/datasources
# bind mount: dashboards for provisioning
- ./Grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards
# bind mount: actual dashboards set up by provisioning
- ./Grafana/dashboards:/var/lib/grafana/dashboards
healthcheck:
test: ["CMD", "wget", "-q", "--spider" ,"localhost:3000"]
interval: 30s
timeout: 20s
retries: 3
start_period: 30s
environment:
POSTGRES_DB_DOMAIN: ${POSTGRES_DB_NAME}
POSTGRES_DB_PORT: ${POSTGRES_DB_PORT}
POSTGRES_USER: dbcon
POSTGRES_DB: kpis
POSTGRES_PW: pw
mosquitto:
image: eclipse-mosquitto
container_name: ${MQTT_MSG_BROKER_NAME}
restart: always
networks:
- mqtt-net
ports:
- 1883:1883
volumes:
- "./Mosquitto/mosquitto.conf://mosquitto/config/mosquitto.conf"
temp-publisher1:
image: thomaspilz/mqtt-temp-publisher
container_name: temp-pub01
restart: always
networks:
- mqtt-net
environment:
MQTT_CLIENT_ID: temp-pub01
MQTT_MSG_BROKER_URL: tcp://${MQTT_MSG_BROKER_NAME}:1883
MQTT_TOPIC: kpis/temp
INITIAL_TASK_DELAY: 10000
temp-publisher2:
image: thomaspilz/mqtt-temp-publisher
container_name: temp-pub02
restart: always
networks:
- mqtt-net
environment:
MQTT_CLIENT_ID: temp-pub02
MQTT_MSG_BROKER_URL: tcp://${MQTT_MSG_BROKER_NAME}:1883
MQTT_TOPIC: kpis/temp
INITIAL_TASK_DELAY: 10000
database-connector:
image: thomaspilz/mqtt-database-connector
container_name: db-connector
restart: always
networks:
- mqtt-net
environment:
POSTGRES_DB_DOMAIN: ${POSTGRES_DB_NAME}
POSTGRES_USER: dbcon
POSTGRES_DB: kpis
POSTGRES_PW: pw
MQTT_CLIENT_ID: database-connector
MQTT_MSG_BROKER_URL: tcp://${MQTT_MSG_BROKER_NAME}:1883
minio:
image: bitnami/minio:2021-debian-10
container_name: ${MINIO_NAME}
restart: always
ports:
# port for api server
- 9000:9000
# port for web gui
- 9001:9001
networks:
- mqtt-net
volumes:
# create/ mount data volume to persist data even when containers are not running
- object-data:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
environment:
MINIO_ACCESS_KEY: "admin"
MINIO_SECRET_KEY: "alongerpw"
MINIO_DEFAULT_BUCKETS: "model-images:download,camera-images:download"
outlier-detector:
image: thomaspilz/outlier-detector
container_name: outlier-detector
restart: always
networks:
- mqtt-net
volumes:
# bind mount: mount data directory to /data inside container
- ./OutlierDetector/data:/data
depends_on:
- outlier-detection-webapp
environment:
WEBSOCKET_DOMAIN: ${OUTLIER_DETECTION_WEBAPP_NAME}
WEBSOCKET_PORT: 5000
WEBSOCKET_EVENT: "/outlier-detection/result"
OBJ_STORE_DOMAIN: ${MINIO_NAME}
OBJ_STORE_API_PORT: 9000
OBJ_STORE_BUCKET: "model-images"
PATH_TO_TEST_DATA_DIR: "/data/PS_test_mix/*"
PATH_TO_AI_MODEL: "/data/Autoencoder_weights_new.h5"
outlier-detection-webapp:
image: thomaspilz/outlier-detection-webapp
container_name: ${OUTLIER_DETECTION_WEBAPP_NAME}
restart: always
networks:
- mqtt-net
ports:
- 5000:5000
healthcheck:
test: ["CMD", "wget", "-q", "--spider" ,"localhost:5000"]
interval: 30s
timeout: 20s
retries: 3
start_period: 30s
environment:
HOSTNAME: "0.0.0.0"
# start server on port 5000
PORT: 5000
networks:
mqtt-net:
volumes:
object-data:
db-data:
grafana-data:
grafana-logs: