-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
175 lines (172 loc) · 5.03 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
version: "3.4"
services:
snmp-exporter:
restart: always
image: prom/snmp-exporter:v0.19.0@sha256:052a6db8eabbb1d748ddc72d63ae18559a641ddee468f862ddd0768120a7081f
read_only: yes
volumes:
- type: bind
source: ./snmp-exporter/snmp.yml
target: /etc/snmp_exporter/snmp.yml
read_only: true
networks:
- prometheus-exporters
- traefik
labels:
- "traefik.enable=true"
- "traefik.frontend.rule=Host:snmp.${HOSTNAME}"
- "traefik.frontend.auth.basic=${AUTH_BASIC}"
- "traefik.docker.network=traefik"
- "traefik.port=9116"
logging:
driver: "json-file"
options:
max-size: "100M"
max-file: "7"
blackbox-exporter:
restart: always
image: prom/blackbox-exporter:v0.17.0@sha256:d3e823580333ceedceadaa2bfea10c8efd4700c8ec0415df72f83c34e1f93314
read_only: yes
volumes:
- type: bind
source: ./blackbox-exporter/config.yml
target: /etc/blackbox_exporter/config.yml
read_only: true
networks:
- prometheus-exporters
- traefik
labels:
- "traefik.enable=true"
- "traefik.frontend.rule=Host:blackbox.${HOSTNAME}"
- "traefik.frontend.auth.basic=${AUTH_BASIC}"
- "traefik.docker.network=traefik"
- "traefik.port=9115"
logging:
driver: "json-file"
options:
max-size: "100M"
max-file: "7"
arubaos-exporter:
restart: always
image: quay.io/westnetz/arubaos-exporter:0.1.1
networks:
- prometheus-exporters
- traefik
labels:
- "traefik.enable=true"
- "traefik.frontend.rule=Host:arubaos.${HOSTNAME}"
- "traefik.frontend.auth.basic=${AUTH_BASIC}"
- "traefik.docker.network=traefik"
- "traefik.port=8080"
logging:
driver: "json-file"
options:
max-size: "100M"
max-file: "7"
prometheus:
restart: always
image: prom/prometheus:v2.21.0@sha256:f3ada803723ccbc443ebea19f7ab24d3323def496e222134bf9ed54ae5b787bd
read_only: yes
command:
# The following options are from https://github.com/prometheus/prometheus/blob/master/Dockerfile
- "--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"
# The following options are our own
- "--storage.tsdb.retention.size=60GB"
volumes:
- type: bind
source: "${PROMETHEUS_CONFIG:-./prometheus/prometheus.yml}"
target: /etc/prometheus/prometheus.yml
read_only: true
- type: bind
source: "${PROMETHEUS_PING:-./prometheus/ping.json}"
target: /etc/prometheus/ping.json
read_only: true
- type: volume
source: prometheus
target: /prometheus
networks:
- prometheus-exporters
- prometheus-frontend
- traefik
labels:
- "traefik.enable=true"
- "traefik.frontend.rule=Host:prometheus.${HOSTNAME}"
- "traefik.frontend.auth.basic=${AUTH_BASIC}"
- "traefik.docker.network=traefik"
- "traefik.port=9090"
logging:
driver: "json-file"
options:
max-size: "100M"
max-file: "7"
grafana:
restart: always
image: grafana/grafana:6.7.4@sha256:43340812d14aa3e60810b85ee9caaf0e423e7aad01000b704cd8ddfb2bb1248e
read_only: yes
tmpfs:
- /tmp
volumes:
- type: volume
source: grafana
target: /var/lib/grafana
environment:
GF_AUTH_ANONYMOUS_ENABLED: "true"
GF_AUTH_ANONYMOUS_ORG_ROLE: "Admin"
GF_AUTH_BASIC_ENABLED: "false"
GF_INSTALL_PLUGINS: "grafana-clock-panel,grafana-polystat-panel"
labels:
- "traefik.enable=true"
- "traefik.frontend.rule=Host:${HOSTNAME}"
- "traefik.frontend.auth.basic=${AUTH_BASIC}"
- "traefik.docker.network=traefik"
- "traefik.port=3000"
networks:
- prometheus-frontend
- traefik
logging:
driver: "json-file"
options:
max-size: "100M"
max-file: "7"
traefik:
restart: always
image: traefik:1.7.26-alpine@sha256:3cbe9e62ef26a9ac17b25702754dfbf56dd346850170be90eabd370f24190ef1
read_only: yes
command: --api --docker --docker.exposedbydefault=false
ports:
- 80:80
- 443:443
volumes:
- type: bind
source: /var/run/docker.sock
target: /var/run/docker.sock
- type: bind
source: ./traefik.toml
target: /traefik.toml
- type: bind
source: ../prometheus-westnetz-acme.json
target: /acme.json
labels:
- "traefik.enable=true"
- "traefik.frontend.rule=Host:traefik.${HOSTNAME}"
- "traefik.frontend.auth.basic=${AUTH_BASIC}"
- "traefik.docker.network=traefik"
- "traefik.port=8080"
networks:
- traefik
logging:
driver: "json-file"
options:
max-size: "100M"
max-file: "7"
networks:
prometheus-exporters:
prometheus-frontend:
traefik:
external: true
volumes:
grafana:
prometheus: