-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose_dev.yaml
73 lines (70 loc) · 2.16 KB
/
compose_dev.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
services:
prometheus:
image: prom/prometheus:latest
container_name: prometheus
ports:
- '9090:9090'
restart: unless-stopped
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- ./prometheus/data:/prometheus/data
# - prometheus_data : /prometheus
command:
- '--web.enable-lifecycle'
- '--storage.tsdb.path=/prometheus'
- '--config.file=/etc/prometheus/prometheus.yml'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
privileged: true
networks:
- monitoring-network
# labels:
# org.label-schema.group: "monitoring"
grafana:
image: grafana/grafana:latest
container_name: grafana
ports:
- '3001:3000'
restart: always
# unless-stopped
environment:
GF_INSTALL_PLUGINS: "grafana-clock-panel,grafana-simple-json-datasource"
GF_AUTH_ANONYMOUS_ENABLED: 'true'
GF_AUTH_ANONYMOUS_ORG_ROLE: 'Admin'
GF_AUTH_DISABLE_LOGIN_FORM: 'true'
depends_on:
- prometheus
- node-exporter
networks:
- monitoring-network
volumes:
- ./monitoring/grafana:/var/lib/grafana
- ./monitoring/grafana/provisioning/datasources:/etc/grafana/provisioning/datasources
- ./monitoring/grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards
# labels:
# org.label-schema.group: "monitoring"
node-exporter:
image: prom/node-exporter
container_name: node-exporter
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
- /etc/hostname:/etc/nodename
- ./node-exporter/data:/etc/node-exporter
command:
- '--path.procfs=/host/proc'
- '--path.sysfs=/host/sys'
- '--collector.textfile.directory=/etc/node-exporter/'
ports:
- 9100:9100
restart: always
deploy:
mode: global
networks:
- monitoring-network
# labels:
# org.label-schema.group: "monitoring"
networks:
monitoring-network:
driver: bridge