-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
61 lines (57 loc) · 1.36 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
version: '3'
services:
prometheus:
image: prom/prometheus:latest
container_name: monitoring-prometheus
hostname: rpi-prometheus
restart: unless-stopped
user: "nobody"
depends_on:
- node-exporter
networks:
- monitoring
expose:
- 9090
links:
- node-exporter:node-exporter
command:
- '--storage.tsdb.path=/prometheus'
- '--config.file=/etc/prometheus/prometheus.yml'
volumes:
- './prometheus/data:/prometheus'
- './prometheus/prometheus.yml:/etc/prometheus/prometheus.yml'
node-exporter:
image: prom/node-exporter:latest
container_name: monitoring-node-exporter
hostname: rpi-exporter
restart: unless-stopped
networks:
- monitoring
expose:
- 9100
command:
- '--path.procfs=/host/proc'
- '--path.sysfs=/host/sys'
volumes:
- '/proc:/host/proc:ro,rslave'
- '/sys:/host/sys:ro,rslave'
grafana:
image: grafana/grafana:latest
container_name: monitoring-grafana
hostname: rpi-grafana
restart: unless-stopped
networks:
- monitoring
ports:
- '3000:3000'
user: '472'
depends_on:
- prometheus
env_file:
- ./grafana.env
volumes:
- './grafana/data:/var/lib/grafana'
- './grafana/provisioning:/etc/grafana/provisioning'
networks:
monitoring:
driver: bridge