forked from eth-educators/eth-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlh-grafana.yml
83 lines (83 loc) · 2.25 KB
/
lh-grafana.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
version: "3.4"
services:
consensus:
expose:
- 5054/tcp
command:
- --metrics
- --metrics-address
- 0.0.0.0
- --validator-monitor-auto
validator:
expose:
- 5064/tcp
command:
- --metrics
- --metrics-address
- 0.0.0.0
prometheus:
restart: "${RESTART}"
build:
context: ./prometheus
image: prometheus:local
volumes:
- prom-data:/prometheus
- ./prometheus/alert_rules.yml:/etc/prometheus/alert_rules.yml
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
environment:
- CLIENT=${COMPOSE_FILE}
expose:
- 9090/tcp
entrypoint: choose-config.sh
command: ["/bin/prometheus", "--storage.tsdb.path=/prometheus", "--web.console.libraries=/usr/share/prometheus/console_libraries", "--web.console.templates=/usr/share/prometheus/consoles"]
depends_on:
- consensus
- validator
- node-exporter
node-exporter:
image: quay.io/prometheus/node-exporter:latest
command:
- '--path.rootfs=/host'
- '--path.procfs=/host/proc'
- '--path.sysfs=/host/sys'
# - '--collector.textfile.directory=/etc/node-exporter/'
- '--collector.filesystem.ignored-mount-points=${NODE_EXPORTER_IGNORE_MOUNT_REGEX}'
- '--no-collector.ipvs'
pid: host
restart: unless-stopped
volumes:
- '/:/host:ro,rslave'
- /etc/hostname:/etc/nodename:ro
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/TZ:ro
expose:
- 9100/tcp
grafana:
restart: "${RESTART}"
build:
context: ./grafana
image: grafana:local
environment:
- GF_SERVER_HTTP_PORT=${GRAFANA_PORT}
volumes:
- grafana-data:/var/lib/grafana
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
depends_on:
- prometheus
expose:
- ${GRAFANA_PORT}/tcp
labels:
- traefik.enable=true
- traefik.http.routers.grafana.entrypoints=web,websecure
- traefik.http.routers.grafana.rule=Host(`${GRAFANA_HOST}.${DOMAIN}`)
- traefik.http.services.grafana.loadbalancer.server.port=${GRAFANA_PORT}
eth:
depends_on:
- grafana
volumes:
grafana-data:
prom-data: