6af3f606a2
- Fix docker-compose.yml p2p port mappings (30304:30303, 30305:30303) - Fix typo BESUS_GENESIS_FILE -> BESU_GENESIS_FILE - Add missing volumes/environment to validator2 and validator3 services - Remove outdated package-lock.json to let CI regenerate cleanly - Validate genesis determinism and extraData alignment Co-Authored-By: Paperclip <noreply@paperclip.ing>
195 lines
5.6 KiB
YAML
195 lines
5.6 KiB
YAML
services:
|
|
# ── Besu validators (IBFT 2.0, 3 nodes) ──
|
|
|
|
besu-validator-1:
|
|
image: hyperledger/besu:24.6.0
|
|
container_name: besu-validator-1
|
|
hostname: validator1
|
|
environment:
|
|
- BESU_LOGGING=INFO
|
|
volumes:
|
|
- ./devnet/besu-config:/besu/config:ro
|
|
- ./devnet/validator-keys/validator1:/besu/keys:ro
|
|
- besu-data-1:/besu/data
|
|
ports:
|
|
- "8545:8545" # RPC
|
|
- "8546:8546" # WS
|
|
- "8551:8551" # Engine
|
|
- "9545:9545" # Metrics
|
|
- "30303:30303" # P2P
|
|
command: >
|
|
--genesis-file=/besu/config/genesis.json
|
|
--data-path=/besu/data
|
|
--node-private-key-file=/besu/keys/key
|
|
--static-nodes-file=/besu/config/static-nodes.json
|
|
--p2p-host=0.0.0.0
|
|
--p2p-port=30303
|
|
--rpc-http-enabled --rpc-http-host=0.0.0.0 --rpc-http-port=8545
|
|
--rpc-http-api=ETH,NET,WEB3,IBFT
|
|
--rpc-http-cors-origins="*"
|
|
--host-allowlist="*"
|
|
--rpc-ws-enabled --rpc-ws-host=0.0.0.0 --rpc-ws-port=8546
|
|
--rpc-ws-api=ETH,NET,WEB3,IBFT
|
|
--metrics-enabled --metrics-host=0.0.0.0 --metrics-port=9545
|
|
--min-gas-price=0
|
|
--sync-mode=FULL
|
|
--discovery-enabled=false
|
|
--p2p-enabled=true
|
|
--logging=INFO
|
|
networks:
|
|
- jcc-devnet
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl -sf http://localhost:8545 -X POST -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"method\":\"eth_blockNumber\",\"params\":[],\"id\":1}' || exit 1"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 30s
|
|
|
|
besu-validator-2:
|
|
image: hyperledger/besu:24.6.0
|
|
container_name: besu-validator-2
|
|
hostname: validator2
|
|
volumes:
|
|
- ./devnet/besu-config:/besu/config:ro
|
|
- ./devnet/validator-keys/validator2:/besu/keys:ro
|
|
- besu-data-2:/besu/data
|
|
ports:
|
|
- "8547:8545" # RPC
|
|
- "8548:8546" # WS
|
|
- "9546:9545" # Metrics
|
|
- "30304:30303" # P2P
|
|
command: >
|
|
--genesis-file=/besu/config/genesis.json
|
|
--data-path=/besu/data
|
|
--node-private-key-file=/besu/keys/key
|
|
--static-nodes-file=/besu/config/static-nodes.json
|
|
--p2p-host=0.0.0.0
|
|
--p2p-port=30303
|
|
--rpc-http-enabled --rpc-http-host=0.0.0.0 --rpc-http-port=8545
|
|
--rpc-http-api=ETH,NET,WEB3,IBFT
|
|
--rpc-http-cors-origins="*"
|
|
--host-allowlist="*"
|
|
--rpc-ws-enabled --rpc-ws-host=0.0.0.0 --rpc-ws-port=8546
|
|
--rpc-ws-api=ETH,NET,WEB3,IBFT
|
|
--metrics-enabled --metrics-host=0.0.0.0 --metrics-port=9545
|
|
--min-gas-price=0
|
|
--sync-mode=FULL
|
|
--discovery-enabled=false
|
|
--p2p-enabled=true
|
|
--logging=INFO
|
|
networks:
|
|
- jcc-devnet
|
|
depends_on:
|
|
besu-validator-1:
|
|
condition: service_healthy
|
|
|
|
besu-validator-3:
|
|
image: hyperledger/besu:24.6.0
|
|
container_name: besu-validator-3
|
|
hostname: validator3
|
|
volumes:
|
|
- ./devnet/besu-config:/besu/config:ro
|
|
- ./devnet/validator-keys/validator3:/besu/keys:ro
|
|
- besu-data-3:/besu/data
|
|
ports:
|
|
- "8549:8545" # RPC
|
|
- "8550:8546" # WS
|
|
- "9547:9545" # Metrics
|
|
- "30305:30303" # P2P
|
|
command: >
|
|
--genesis-file=/besu/config/genesis.json
|
|
--data-path=/besu/data
|
|
--node-private-key-file=/besu/keys/key
|
|
--static-nodes-file=/besu/config/static-nodes.json
|
|
--p2p-host=0.0.0.0
|
|
--p2p-port=30303
|
|
--rpc-http-enabled --rpc-http-host=0.0.0.0 --rpc-http-port=8545
|
|
--rpc-http-api=ETH,NET,WEB3,IBFT
|
|
--rpc-http-cors-origins="*"
|
|
--host-allowlist="*"
|
|
--rpc-ws-enabled --rpc-ws-host=0.0.0.0 --rpc-ws-port=8546
|
|
--rpc-ws-api=ETH,NET,WEB3,IBFT
|
|
--metrics-enabled --metrics-host=0.0.0.0 --metrics-port=9545
|
|
--min-gas-price=0
|
|
--sync-mode=FULL
|
|
--discovery-enabled=false
|
|
--p2p-enabled=true
|
|
--logging=INFO
|
|
networks:
|
|
- jcc-devnet
|
|
depends_on:
|
|
besu-validator-1:
|
|
condition: service_healthy
|
|
|
|
# ── RPC Gateway ──
|
|
rpc-gateway:
|
|
image: nginx:alpine
|
|
container_name: jcc-rpc-gateway
|
|
volumes:
|
|
- ./rpc-gateway/nginx.conf:/etc/nginx/nginx.conf:ro
|
|
ports:
|
|
- "8080:80"
|
|
networks:
|
|
- jcc-devnet
|
|
depends_on:
|
|
- besu-validator-1
|
|
|
|
# ── Prometheus ──
|
|
prometheus:
|
|
image: prom/prometheus:v2.54.0
|
|
container_name: jcc-prometheus
|
|
volumes:
|
|
- ./monitoring/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
|
- prometheus-data:/prometheus
|
|
ports:
|
|
- "9090:9090"
|
|
command:
|
|
- "--config.file=/etc/prometheus/prometheus.yml"
|
|
- "--storage.tsdb.path=/prometheus"
|
|
networks:
|
|
- jcc-devnet
|
|
|
|
# ── Grafana ──
|
|
grafana:
|
|
image: grafana/grafana:11.0.0
|
|
container_name: jcc-grafana
|
|
volumes:
|
|
- ./monitoring/grafana/provisioning:/etc/grafana/provisioning:ro
|
|
- ./monitoring/grafana/dashboards:/var/lib/grafana/dashboards:ro
|
|
- grafana-data:/var/lib/grafana
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
- GF_SECURITY_ADMIN_USER=${GRAFANA_ADMIN_USER:-admin}
|
|
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD:-admin}
|
|
- GF_USERS_ALLOW_SIGN_UP=false
|
|
networks:
|
|
- jcc-devnet
|
|
depends_on:
|
|
- prometheus
|
|
|
|
# ── Loki ──
|
|
loki:
|
|
image: grafana/loki:3.0.0
|
|
container_name: jcc-loki
|
|
volumes:
|
|
- ./monitoring/loki/loki.yml:/etc/loki/local-config.yaml:ro
|
|
- loki-data:/loki
|
|
ports:
|
|
- "3100:3100"
|
|
command: -config.file=/etc/loki/local-config.yaml
|
|
networks:
|
|
- jcc-devnet
|
|
|
|
volumes:
|
|
besu-data-1:
|
|
besu-data-2:
|
|
besu-data-3:
|
|
prometheus-data:
|
|
grafana-data:
|
|
loki-data:
|
|
|
|
networks:
|
|
jcc-devnet:
|
|
driver: bridge
|