-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-stack.yml
91 lines (91 loc) · 2.32 KB
/
docker-stack.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
version: "3.3"
services:
prometheus:
image: prom/prometheus:latest
ports:
- "9090:9090"
deploy:
replicas: 1
restart_policy:
condition: any
placement:
constraints: [node.role == manager]
networks:
- prom-net
volumes:
- prometheus_data:/prometheus
configs:
- source: prom-config
target: /etc/prometheus/prometheus.yml
- source: alert.rules
target: /etc/prometheus/alert.rules
alertmanager:
image: prom/alertmanager:latest
depends_on:
- prometheus
deploy:
replicas: 1
restart_policy:
condition: any
placement:
constraints: [node.role == manager]
volumes:
- alertmanager_data:/alertmanager
networks:
- prom-net
configs:
- source: alertmanager-config
target: /etc/alertmanager/config.yml
cadvisor:
image: google/cadvisor:latest
ports:
- "8080:8080"
deploy:
restart_policy:
condition: any
mode: global
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
networks:
- prom-net
engine-proxy:
image: basi/socat
ports:
- "4998:4999"
deploy:
restart_policy:
condition: any
mode: global
networks:
- prom-net
grafana:
image: grafana/grafana:latest
ports:
- "80:3000"
deploy:
replicas: 1
restart_policy:
condition: any
placement:
constraints: [node.role == manager]
volumes:
- grafana_data:/var/lib/grafana
networks:
- grafana-net
volumes:
prometheus_data:
alertmanager_data:
grafana_data:
configs:
prom-config:
file: /etc/prometheus/prometheus.yml
alertmanager-config:
file: /etc/alertmanager/config.yml
alert.rules:
file: /etc/alertmanager/alert.rules
networks:
prom-net:
grafana-net: