forked from paradigmxyz/reth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
76 lines (72 loc) · 2.12 KB
/
docker-compose.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
version: '3.9'
name: 'reth'
services:
reth:
restart: unless-stopped
image: ghcr.io/paradigmxyz/reth
ports:
- '9001:9001' # metrics
- '30303:30303' # eth/66 peering
- '8545:8545' # rpc
- '8551:8551' # engine
volumes:
- rethdata_mainnet:/root/.local/share/reth/mainnet/db
- rethdata_sepolia:/root/.local/share/reth/sepolia/db
- rethlogs:/root/rethlogs
- ./jwttoken:/root/jwt:ro
# For Sepolia, replace `--chain mainnet` with `--chain sepolia`
command: >
node
--chain mainnet
--metrics 0.0.0.0:9001
--log.file.directory /root/rethlogs
--authrpc.addr 0.0.0.0
--authrpc.port 8551
--authrpc.jwtsecret /root/jwt/jwt.hex
--http --http.addr 0.0.0.0 --http.port 8545
--http.api "eth,net,web3"
prometheus:
restart: unless-stopped
image: prom/prometheus
depends_on:
- reth
ports:
- 9090:9090
volumes:
- ./prometheus/:/etc/prometheus/
- prometheusdata:/prometheus
command:
- --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.path=/prometheus
grafana:
restart: unless-stopped
image: grafana/grafana:10.1.1
depends_on:
- reth
- prometheus
ports:
- 3000:3000
environment:
PROMETHEUS_URL: http://prometheus:9090
volumes:
- grafanadata:/var/lib/grafana
- ./grafana/datasources:/etc/grafana/provisioning/datasources
- ./grafana/dashboards:/etc/grafana/provisioning_temp/dashboards
# 1. Copy dashboards from temp directory to prevent modifying original host files
# 2. Replace Prometheus datasource placeholder with the actual name
# 3. Run Grafana
entrypoint: >
sh -c "cp -r /etc/grafana/provisioning_temp/dashboards/. /etc/grafana/provisioning/dashboards &&
find /etc/grafana/provisioning/dashboards/ -name '*.json' -exec sed -i 's/$${DS_PROMETHEUS}/Prometheus/g' {} \+ &&
/run.sh"
volumes:
rethdata_mainnet:
driver: local
rethdata_sepolia:
driver: local
rethlogs:
driver: local
prometheusdata:
driver: local
grafanadata:
driver: local