-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdocker-compose.yml
184 lines (168 loc) · 4.06 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
version: '3.1'
volumes:
prometheus_data: {}
grafana_data: {}
redis_data: {}
mosquitto_data: {}
elastic_data: {}
docker_gen: {}
networks:
front-tier:
back-tier:
services:
prometheus:
image: prom/prometheus
volumes:
- ./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
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:
- ./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.supergreenlab.com
depends_on:
- prometheus
volumes:
- grafana_data:/var/lib/grafana
- ./grafana/provisioning/:/etc/grafana/provisioning/
env_file:
- ./grafana/config.monitoring
networks:
- back-tier
- front-tier
restart: always
supergreenlog:
image: supergreenlab/supergreenlog
command:
- '-mqtt_username=supergreen'
- '-mqtt_password=multipass'
depends_on:
- redis
- mqtt
- elastic
networks:
- back-tier
restart: always
redis:
image: redis
volumes:
- redis_data:/data
restart: always
# ports:
# - 6379:6379
networks:
- back-tier
mqtt:
image: eclipse-mosquitto
restart: always
ports:
- 1883:1883
networks:
- back-tier
- front-tier
volumes:
- ./mosquitto:/mosquitto/config
- mosquitto_data:/mosquitto/data
elastic:
image: docker.elastic.co/elasticsearch/elasticsearch:6.4.2
restart: always
# ports:
# - 9200:9200
# - 9300:9300
networks:
- back-tier
volumes:
- ./elasticsearch:/usr/share/elasticsearch/config
- elastic_data:/usr/share/elasticsearch/data
kibana:
image: docker.elastic.co/kibana/kibana:6.4.2
restart: always
environment:
- VIRTUAL_HOST=kibana.supergreenlab.com
networks:
- back-tier
- front-tier
volumes:
- ./kibana:/usr/share/kibana/config
update:
image: nginx
environment:
- VIRTUAL_HOST=update.supergreenlab.com
volumes:
- ./update:/usr/share/nginx/html
networks:
- front-tier
nginx:
image: nginx
ports:
- 80:80
- 443:443
volumes:
- docker_gen:/etc/nginx/conf.d
- ./nginx/htpasswd:/etc/nginx/htpasswd
networks:
- front-tier
depends_on:
- dockergen
- kibana
- grafana
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
- ./nginx/nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl
- ./nginx/htpasswd:/etc/nginx/htpasswd
networks:
- front-tier
depends_on:
- kibana
- grafana