-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdocker-compose-swarm.yaml
58 lines (53 loc) · 1.13 KB
/
docker-compose-swarm.yaml
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
version: '3.9'
services:
covid19_1:
image: alvarodelcastillo/covid19swarm:main
ports:
- "40001:8000"
deploy:
replicas: 10
update_config:
delay: 10s
prometheus:
image: prom/prometheus
# https://github.com/prometheus/prometheus/issues/8185
user: root
ports:
- "9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- /var/run/docker.sock:/var/run/docker.sock:ro
deploy:
replicas: 1
node_exporter:
image: prom/node-exporter
command:
- '--path.rootfs=/host'
ports:
- "9100:9100"
volumes:
- '/:/host:ro,rslave'
deploy:
mode: global
labels:
prometheus-job: node-exporter
grafana:
image: grafana/grafana:6.5.0
ports:
- "3000:3000"
deploy:
replicas: 1
cadvisor:
image: google/cadvisor
ports:
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /:/rootfs:ro
- /var/run:/var/run
- /sys:/sys:ro
- /var/lib/docker:/var/lib/docker:ro
deploy:
mode: global
labels:
prometheus-job: cadvisor