forked from eth-educators/eth-docker
-
Notifications
You must be signed in to change notification settings - Fork 6
/
grafana-rootless.yml
94 lines (88 loc) · 2.64 KB
/
grafana-rootless.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
92
93
94
# Grafana for use with rootless docker. Omits node-exporter, cadvisor, promtail and Loki
x-logging: &logging
logging:
driver: json-file
options:
max-size: 100m
max-file: "3"
tag: '{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}'
services:
prometheus:
restart: "unless-stopped"
build:
context: ./prometheus
image: prometheus:local
pull_policy: never
volumes:
- prom-data:/prometheus
- /etc/localtime:/etc/localtime:ro
- ./prometheus/conf.d/:/etc/prometheus/conf.d/:ro
- ./prometheus/custom-prom.yml:/etc/prometheus/custom-prom.yml:ro
environment:
- CLIENT=${COMPOSE_FILE}
command:
- --storage.tsdb.path=/prometheus
- --storage.tsdb.retention.time=40d
- --web.console.libraries=/usr/share/prometheus/console_libraries
- --web.console.templates=/usr/share/prometheus/consoles
<<: *logging
depends_on:
- blackbox-exporter
- json-exporter
- ethereum-metrics-exporter
ethereum-metrics-exporter:
restart: "unless-stopped"
image: samcm/ethereum-metrics-exporter:0.24.0-debian
entrypoint:
- /ethereum-metrics-exporter
- --consensus-url=${CL_NODE}
- --execution-url=http://execution:${EL_RPC_PORT:-8545}
<<: *logging
blackbox-exporter:
restart: "unless-stopped"
image: prom/blackbox-exporter:master
volumes:
- ./prometheus/blackbox.yml:/config/blackbox.yml
- /etc/localtime:/etc/localtime:ro
<<: *logging
command:
- --config.file=/config/blackbox.yml
json-exporter:
restart: "unless-stopped"
image: prometheuscommunity/json-exporter:latest
volumes:
- ./prometheus/json.yml:/config/json.yml
- /etc/localtime:/etc/localtime:ro
<<: *logging
command:
- --config.file
- /config/json.yml
grafana:
restart: "unless-stopped"
build:
context: ./grafana
image: grafana:local
pull_policy: never
user: grafana
environment:
- GF_SERVER_HTTP_PORT=${GRAFANA_PORT}
- CLIENT=${COMPOSE_FILE}
volumes:
- grafana-data:/var/lib/grafana
- grafana-config:/etc/grafana
- /etc/localtime:/etc/localtime:ro
depends_on:
- prometheus
entrypoint: ["provision.sh"]
command: /run.sh
<<: *logging
labels:
- traefik.enable=true
- traefik.http.routers.grafana.entrypoints=web,websecure
- traefik.http.routers.grafana.rule=Host(`${GRAFANA_HOST}.${DOMAIN}`)
- traefik.http.routers.grafana.tls.certresolver=letsencrypt
- traefik.http.services.grafana.loadbalancer.server.port=${GRAFANA_PORT}
volumes:
grafana-data:
grafana-config:
prom-data: