2022-06-02 04:46:40 +00:00
|
|
|
# Erigon's parts - can run inside and outside of Erigon (as separated processes).
|
2022-02-07 09:54:20 +00:00
|
|
|
# For example: p2p sentry can work inside Erigon - or outside (even on another server), txpool also, JSON RPC also
|
|
|
|
#
|
2022-06-02 04:46:40 +00:00
|
|
|
# This file is an example: how to start all Erigon's services as separated processes.
|
2022-02-07 09:54:20 +00:00
|
|
|
|
2022-06-02 04:46:40 +00:00
|
|
|
# Default: --datadir=/home/erigon/.local/share/erigon
|
|
|
|
# Ports: `9090` execution engine (private api), `9091` sentry, `9092` consensus engine, `9093` snapshot downloader, `9094` TxPool
|
|
|
|
# Ports: `8545` json rpc, `8551` consensus json rpc, `30303` eth p2p protocol, `42069` bittorrent protocol,
|
|
|
|
|
|
|
|
# Connections: erigon -> (sentries, downloader), rpcdaemon -> (erigon, txpool), txpool -> erigon
|
|
|
|
|
|
|
|
# Basic erigon's service
|
|
|
|
x-erigon-service: &default-erigon-servie
|
|
|
|
image: thorax/erigon:${TAG:-latest}
|
|
|
|
pid: service:erigon # Use erigon's PID namespace. It's required to open Erigon's DB from another process (RPCDaemon local-mode)
|
|
|
|
volumes_from: [ erigon ]
|
|
|
|
restart: unless-stopped
|
|
|
|
mem_swappiness: 0
|
2020-08-01 07:39:04 +00:00
|
|
|
|
|
|
|
services:
|
|
|
|
|
2021-05-26 10:35:39 +00:00
|
|
|
erigon:
|
2022-01-26 15:26:33 +00:00
|
|
|
image: thorax/erigon:${TAG:-latest}
|
2020-08-01 07:39:04 +00:00
|
|
|
build: .
|
2022-05-31 07:35:10 +00:00
|
|
|
command: |
|
2022-06-02 09:03:33 +00:00
|
|
|
erigon ${ERIGON_FLAGS-} --private.api.addr=0.0.0.0:9090
|
|
|
|
--sentry.api.addr=sentry:9091 --downloader.api.addr=downloader:9093 --txpool.disable
|
2022-05-31 07:35:10 +00:00
|
|
|
--metrics --metrics.addr=0.0.0.0 --metrics.port=6060 --pprof --pprof.addr=0.0.0.0 --pprof.port=6061
|
2020-08-01 07:39:04 +00:00
|
|
|
volumes:
|
2022-06-02 04:46:40 +00:00
|
|
|
# It's ok to mount sub-dirs of "datadir" to different drives
|
2021-07-24 09:14:46 +00:00
|
|
|
- ${XDG_DATA_HOME:-~/.local/share}/erigon:/home/erigon/.local/share/erigon
|
2022-05-31 07:35:10 +00:00
|
|
|
restart: unless-stopped
|
2022-06-02 04:46:40 +00:00
|
|
|
mem_swappiness: 0
|
2022-05-31 07:35:10 +00:00
|
|
|
|
2022-06-02 04:46:40 +00:00
|
|
|
sentry:
|
|
|
|
<<: *default-erigon-servie
|
|
|
|
command: sentry ${SENTRY_FLAGS-} --sentry.api.addr=0.0.0.0:9091
|
|
|
|
ports: [ "30303:30303/tcp", "30303:30303/udp" ]
|
2022-05-31 07:35:10 +00:00
|
|
|
|
2022-06-02 04:46:40 +00:00
|
|
|
downloader:
|
|
|
|
<<: *default-erigon-servie
|
|
|
|
command: downloader ${DOWNLOADER_FLAGS-} --downloader.api.addr=0.0.0.0:9093
|
|
|
|
ports: [ "42069:42069/tcp", "42069:42069/udp" ]
|
|
|
|
|
|
|
|
txpool:
|
|
|
|
<<: *default-erigon-servie
|
|
|
|
command: txpool ${TXPOOL_FLAGS-} --private.api.addr=erigon:9090 --txpool.api.addr=0.0.0.0:9094
|
|
|
|
|
|
|
|
rpcdaemon:
|
|
|
|
<<: *default-erigon-servie
|
2022-05-31 07:35:10 +00:00
|
|
|
command: |
|
2022-06-02 04:46:40 +00:00
|
|
|
rpcdaemon ${RPCDAEMON_FLAGS-} --http.addr=0.0.0.0 --http.vhosts=* --http.corsdomain=* --ws
|
|
|
|
--private.api.addr=erigon:9090 --txpool.api.addr=txpool:9094
|
2022-06-02 09:03:33 +00:00
|
|
|
--authrpc.jwtsecret=/home/erigon/.local/share/erigon/jwt.hex
|
2022-06-02 04:46:40 +00:00
|
|
|
ports: [ "8545:8545" ] # "8551:8551"
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-08-01 07:39:04 +00:00
|
|
|
|
|
|
|
prometheus:
|
2022-06-02 04:46:40 +00:00
|
|
|
image: prom/prometheus:v2.36.0
|
2021-07-19 13:40:09 +00:00
|
|
|
user: 1000:1000 # Uses erigon user from Dockerfile
|
2022-02-12 07:08:20 +00:00
|
|
|
command: --log.level=warn --config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/prometheus --storage.tsdb.retention.time=150d --web.console.libraries=/usr/share/prometheus/console_libraries --web.console.templates=/usr/share/prometheus/consoles
|
2022-05-31 07:35:10 +00:00
|
|
|
ports: [ "9090:9090" ]
|
2020-08-01 07:39:04 +00:00
|
|
|
volumes:
|
2021-05-26 10:35:39 +00:00
|
|
|
- ${ERIGON_PROMETHEUS_CONFIG:-./cmd/prometheus/prometheus.yml}:/etc/prometheus/prometheus.yml
|
|
|
|
- ${XDG_DATA_HOME:-~/.local/share}/erigon-prometheus:/prometheus
|
2021-07-09 08:37:36 +00:00
|
|
|
restart: unless-stopped
|
2020-08-01 07:39:04 +00:00
|
|
|
|
|
|
|
grafana:
|
2022-06-02 04:46:40 +00:00
|
|
|
image: grafana/grafana:8.5.4
|
2021-07-19 13:40:09 +00:00
|
|
|
user: 1000:1000 # Uses erigon user from Dockerfile
|
2022-05-31 07:35:10 +00:00
|
|
|
ports: [ "3000:3000" ]
|
2020-08-01 07:39:04 +00:00
|
|
|
volumes:
|
2021-05-26 10:35:39 +00:00
|
|
|
- ${ERIGON_GRAFANA_CONFIG:-./cmd/prometheus/grafana.ini}:/etc/grafana/grafana.ini
|
2020-08-01 07:39:04 +00:00
|
|
|
- ./cmd/prometheus/datasources:/etc/grafana/provisioning/datasources
|
|
|
|
- ./cmd/prometheus/dashboards:/etc/grafana/provisioning/dashboards
|
2021-05-26 10:35:39 +00:00
|
|
|
- ${XDG_DATA_HOME:-~/.local/share}/erigon-grafana:/var/lib/grafana
|
2021-07-09 08:37:36 +00:00
|
|
|
restart: unless-stopped
|