forked from t0p4/SuperGreenCloud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
293 lines (263 loc) · 6.32 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
version: '3.1'
volumes:
prometheus_data: {}
grafana_data: {}
redis_data: {}
postgres_data: {}
mosquitto_data: {}
docker_gen: {}
minio_data: {}
networks:
front-tier:
back-tier:
services:
prometheus:
image: prom/prometheus
volumes:
- ./config/prometheus:/etc/prometheus
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
links:
- cadvisor:cadvisor
- alertmanager:alertmanager
depends_on:
- cadvisor
ports:
- 9090:9090
networks:
- back-tier
restart: always
node-exporter:
image: prom/node-exporter
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- '--path.procfs=/host/proc'
- '--path.sysfs=/host/sys'
- '--collector.filesystem.ignored-mount-points'
- "^/(sys|proc|dev|host|etc|rootfs/var/lib/docker/containers|rootfs/var/lib/docker/overlay2|rootfs/run/docker/netns|rootfs/var/lib/docker/aufs)($$|/)"
networks:
- back-tier
restart: always
alertmanager:
image: prom/alertmanager
volumes:
- ./config/alertmanager:/etc/alertmanager
networks:
- back-tier
restart: always
command:
- '--config.file=/etc/alertmanager/config.yml'
- '--storage.path=/alertmanager'
cadvisor:
image: google/cadvisor
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
networks:
- back-tier
restart: always
grafana:
image: grafana/grafana
# user: "104"
environment:
- VIRTUAL_HOST=${GRAFANA_HOST}
depends_on:
- prometheus
volumes:
- grafana_data:/var/lib/grafana
- ./config/grafana/provisioning:/etc/grafana/provisioning
env_file:
- ./config/grafana/config.monitoring
networks:
- back-tier
restart: always
nginx:
image: nginx
ports:
- 80:80
- 443:443
volumes:
- docker_gen:/etc/nginx/conf.d
- ./config/nginx/htpasswd:/etc/nginx/htpasswd
- ./config/nginx/certs:/etc/nginx/certs
- ./config/nginx/vhost.d:/etc/nginx/vhost.d
networks:
- front-tier
- back-tier
dockergen:
image: jwilder/docker-gen
command: -notify-sighup nginx -watch /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
volumes:
- docker_gen:/etc/nginx/conf.d
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./config/nginx/nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl
- ./config/nginx/htpasswd:/etc/nginx/htpasswd
- ./config/nginx/certs:/etc/nginx/certs
- ./config/nginx/vhost.d:/etc/nginx/vhost.d
networks:
- front-tier
- back-tier
depends_on:
- nginx
redis:
image: redis
volumes:
- redis_data:/data
restart: always
networks:
- back-tier
postgres:
image: postgres
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
restart: always
networks:
- back-tier
mqtt:
image: eclipse-mosquitto
restart: always
ports:
- 1883:1883
networks:
- back-tier
- front-tier
volumes:
- ./config/mosquitto:/mosquitto/config
- mosquitto_data:/mosquitto/data
minio:
image: minio/minio
restart: always
environment:
- VIRTUAL_HOST=${MINIO_HOST}
- MINIO_ACCESS_KEY=${MINIO_ACCESS_KEY}
- MINIO_SECRET_KEY=${MINIO_SECRET_KEY}
volumes:
- minio_data:/data
command: server /data
networks:
- back-tier
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
# HTTP Services
update:
image: nginx
environment:
- VIRTUAL_HOST=${UPDATE_HOST},${SSLUPDATE_HOST}
volumes:
- ./www/update:/usr/share/nginx/html
networks:
- back-tier
controller:
image: nginx
environment:
- VIRTUAL_HOST=${CONTROLLER_HOST}
volumes:
- ./www/controller:/usr/share/nginx/html
networks:
- back-tier
live:
image: nginx
environment:
- VIRTUAL_HOST=${LIVE_HOST}
volumes:
- ./www/live:/usr/share/nginx/html
networks:
- back-tier
livecam:
image: supergreenlab/livecam
environment:
- VIRTUAL_HOST=${LIVECAM_HOST}
networks:
- back-tier
volumes:
- ./config/livecam:/etc/livecam
restart: always
upgrader:
image: nginx
environment:
- VIRTUAL_HOST=${UPGRADER_HOST}
volumes:
- ./www/upgrader:/usr/share/nginx/html
networks:
- back-tier
# Backend
mqttparser:
image: supergreenlab/mqttparser
depends_on:
- redis
- mqtt
networks:
- back-tier
volumes:
- ./config/mqttparser:/etc/mqttparser
restart: always
appbackend:
image: supergreenlab/appbackend
environment:
- VIRTUAL_HOST=${APPBACKEND_HOST}
depends_on:
- prometheus
networks:
- back-tier
volumes:
- ./config/appbackend:/etc/appbackend
restart: always
webbackend:
image: supergreenlab/webbackend
environment:
- VIRTUAL_HOST=${WEBBACKEND_HOST}
networks:
- back-tier
volumes:
- ./config/webbackend:/etc/webbackend
restart: always
towelie:
image: supergreenlab/towelie
environment:
- VIRTUAL_HOST=${TOWELIE_HOST}
networks:
- back-tier
volumes:
- ./config/towelie:/etc/towelie
restart: always
tipbackend:
image: supergreenlab/tipbackend
environment:
- VIRTUAL_HOST=${TIPBACKEND_HOST}
networks:
- back-tier
volumes:
- ./config/tipbackend:/etc/tipbackend
restart: always
# Legacy Backend
supergreenpromproxy:
image: supergreenlab/supergreenpromproxy
environment:
- VIRTUAL_HOST=${SUPERGREENPROMPROXY_HOST}
depends_on:
- prometheus
networks:
- back-tier
restart: always
discord:
image: supergreenlab/supergreendiscordcommunity
env_file:
- ./config/discord/env
environment:
- VIRTUAL_HOST=${DISCORD_HOST}
networks:
- back-tier