-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
164 lines (156 loc) · 4.75 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
version: "3.4"
networks: #Create network manually if error on creating network due to host restriction e.g. docker create network prometheus
proxy-net: # "docker network create monitor-net"
external: true
volumes:
prometheus_data: {}
grafana_data: {}
uptime_kuma:
config:
services:
grafana:
image: grafana/grafana:latest
container_name: grafana
networks:
- proxy-net
ports:
- 3000:3000
volumes:
- grafana_data:/var/lib/grafana
- ./grafana/provisioning:/etc/grafana/provisioning
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=changeme
- GF_USERS_ALLOW_SIGN_UP=false
- AWS_SDK_LOAD_CONFIG=1
# Grafana image-rendering
- GF_RENDERING_SERVER_URL=http://renderer:8081/render
- GF_RENDERING_CALLBACK_URL=http://grafana:3000/
- GF_LOG_FILTERS=rendering:debug
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.grafana.entrypoints=websecure"
- "traefik.http.routers.grafana.tls=true"
- "traefik.http.routers.grafana.tls.certresolver=myresolver"
- "traefik.http.routers.grafana.rule=Host(`${GRAFANA}`)"
renderer: # https://github.com/grafana/grafana-image-renderer
image: grafana/grafana-image-renderer:latest
networks:
- proxy-net
ports:
- 8081
environment:
ENABLE_METRICS: 'true'
snmp_exporter:
image: prom/snmp-exporter
container_name: snmp-exporter
networks:
- proxy-net
ports:
- 9116:9116
volumes:
- ./snmp_exporter/:/etc/snmp_exporter/
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.snmp-exporter.entrypoints=websecure"
- "traefik.http.routers.snmp-exporter.tls=true"
- "traefik.http.routers.snmp-exporter.tls.certresolver=myresolver"
- "traefik.http.routers.snmp-exporter.rule=Host(`${SNMP}`)"
prometheus:
image: prom/prometheus:latest
container_name: prometheus
networks:
- proxy-net
volumes:
- ./prometheus:/etc/prometheus/
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--storage.tsdb.retention.time=1y'
ports:
- 9090:9090
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.prometheus.entrypoints=websecure"
- "traefik.http.routers.prometheus.tls=true"
- "traefik.http.routers.prometheus.tls.certresolver=myresolver"
- "traefik.http.routers.prometheus.rule=Host(`${PROMETHEUS}`)"
blackbox_exporter:
image: prom/blackbox-exporter:latest
container_name: blackbox-exporter
networks:
- proxy-net
privileged: true
volumes:
- "./config:/config"
command:
- '--config.file=/config/blackbox.yml'
ports:
- '9115:9115'
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.blackbox-exporter.entrypoints=websecure"
- "traefik.http.routers.blackbox-exporter.tls=true"
- "traefik.http.routers.blackbox-exporter.tls.certresolver=myresolver"
- "traefik.http.routers.blackbox-exporter.rule=Host(`${BLACKBOX}`)"
speedtest-exporter:
image: miguelndecarvalho/speedtest-exporter
container_name: speedtest-exporter
networks:
- proxy-net
restart: always
ports:
- 9798:9798
cadvisor:
image: gcr.io/cadvisor/cadvisor:latest
container_name: cadvisor
networks:
- proxy-net
ports:
- 8080:8080
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
command:
- '-housekeeping_interval=10s' # https://github.com/google/cadvisor/issues/2523
- '-docker_only=true' # ^^^^ 19 > ~5%
depends_on:
- redis
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.cadvisor.entrypoints=websecure"
- "traefik.http.routers.cadvisor.tls=true"
- "traefik.http.routers.cadvisor.tls.certresolver=myresolver"
- "traefik.http.routers.cadvisor.rule=Host(`${CADVISOR}`)"
redis:
image: redis:latest
container_name: redis
networks:
- proxy-net
ports:
- 6379:6379
restart: unless-stopped
uptime-kuma:
image: louislam/uptime-kuma
container_name: uptime-kuma
volumes:
- ./uptime-kuma:/app/data
ports:
- 3001:3001
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.uptime.entrypoints=websecure"
- "traefik.http.routers.uptime.tls=true"
- "traefik.http.routers.uptime.tls.certresolver=myresolver"
- "traefik.http.routers.uptime.rule=Host(`${UPTIME}`)"
networks:
- proxy-net