mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
76 lines
2.1 KiB
YAML
76 lines
2.1 KiB
YAML
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.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.0
|
|
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 |