-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-stack-monitoring.yml
60 lines (55 loc) · 1.37 KB
/
docker-stack-monitoring.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
version: '3.7'
networks:
network:
driver: overlay
volumes:
grafana-data:
prometheus-data:
services:
prometheus:
image: "twistedfantasy-prometheus"
deploy:
replicas: 1
placement:
constraints: [node.role == manager]
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--storage.tsdb.retention=200h'
- '--web.enable-lifecycle'
ports:
- "9090:9090"
volumes:
- prometheus-data:/prometheus
networks:
- network
alertmanager:
image: "twistedfantasy-alertmanager"
deploy:
replicas: 1
placement:
constraints: [node.role == manager]
command:
- '--config.file=/etc/alertmanager/config.yml'
- '--storage.path=/alertmanager'
- '--web.listen-address=0.0.0.0:9093'
networks:
- network
grafana:
image: "twistedfantasy-grafana"
deploy:
replicas: 1
placement:
constraints: [node.role == manager]
environment:
- GF_SECURITY_ADMIN_USER=${ADMIN_USER:-admin}
- GF_SECURITY_ADMIN_PASSWORD=${ADMIN_PASSWORD:-admin}
- GF_USERS_ALLOW_SIGN_UP=false
ports:
- "3000:3000"
volumes:
- grafana-data:/var/lib/grafana
networks:
- network