edelweism/besu-and-explorer/docker-compose-besu.yml
2026-04-01 12:07:25 +07:00

153 lines
4.6 KiB
YAML

services:
node-1:
image: ${BESU_IMAGE}
container_name: besu-node-1
hostname: node-1
networks:
besu-network:
ipv4_address: 172.16.239.11
ports:
- '8545:8545'
- '8546:8546'
volumes:
- ./nodes:/nodes
command:
- --data-path=/nodes/node-1/data
- --genesis-file=/nodes/networkFiles/genesis.json
- --network-id=${NETWORK_ID}
- --rpc-http-enabled=true
- --rpc-http-host=0.0.0.0
- --rpc-http-api=ETH,NET,IBFT,WEB3,ADMIN,DEBUG,TRACE, TXPOOL
- --rpc-http-max-active-connections=80
- --rpc-http-cors-origins=*
- --host-allowlist=*
- --p2p-enabled=true
- --p2p-host=172.16.239.11
- --p2p-port=30303
- --rpc-ws-enabled=true
- --rpc-ws-host=0.0.0.0
- --rpc-ws-port=8546
- --rpc-ws-api=ETH,NET,IBFT,WEB3,ADMIN,DEBUG,TRACE,TXPOOL
- --rpc-ws-max-active-connections=80
- --data-storage-format=BONSAI
- --min-gas-price=${MIN_GAS_PRICE}
restart: unless-stopped
node-2:
image: ${BESU_IMAGE}
container_name: besu-node-2
hostname: node-2
networks:
besu-network:
ipv4_address: 172.16.239.12
ports:
- '8547:8545'
volumes:
- ./nodes:/nodes
depends_on:
- node-1
command:
- --data-path=/nodes/node-2/data
- --genesis-file=/nodes/networkFiles/genesis.json
- --network-id=${NETWORK_ID}
- --rpc-http-enabled=true
- --rpc-http-host=0.0.0.0
- --rpc-http-port=8545
- --rpc-http-api=ETH,NET,IBFT,WEB3,ADMIN
- --rpc-http-cors-origins=*
- --rpc-http-max-active-connections=80
- --host-allowlist=*
- --p2p-enabled=true
- --p2p-host=172.16.239.12
- --p2p-port=30303
- --rpc-ws-enabled=true
- --rpc-ws-host=0.0.0.0
- --rpc-ws-port=8546
- --rpc-ws-api=ETH,NET,IBFT,WEB3,ADMIN,DEBUG,TRACE,TXPOOL
- --rpc-ws-max-active-connections=80
- --data-storage-format=BONSAI
- --bootnodes=enode://ee7202c18150e21bf68a2e4f87590a273cda755dc68a66267dea175aaaf2dfe48b70a90356c00d05eb163b14f807f538199570e99a9d76451b953d0354506639@172.16.239.11:30303
- --min-gas-price=${MIN_GAS_PRICE}
restart: unless-stopped
node-3:
image: ${BESU_IMAGE}
container_name: besu-node-3
hostname: node-3
networks:
besu-network:
ipv4_address: 172.16.239.13
ports:
- '8548:8545'
volumes:
- ./nodes:/nodes
depends_on:
- node-1
command:
- --data-path=/nodes/node-3/data
- --genesis-file=/nodes/networkFiles/genesis.json
- --network-id=${NETWORK_ID}
- --rpc-http-enabled=true
- --rpc-http-host=0.0.0.0
- --rpc-http-port=8545
- --rpc-http-api=ETH,NET,IBFT,WEB3,ADMIN
- --rpc-http-max-active-connections=80
- --rpc-http-cors-origins=*
- --host-allowlist=*
- --p2p-enabled=true
- --p2p-host=172.16.239.13
- --p2p-port=30303
- --rpc-ws-enabled=true
- --rpc-ws-host=0.0.0.0
- --rpc-ws-port=8546
- --rpc-ws-api=ETH,NET,IBFT,WEB3,ADMIN,DEBUG,TRACE,TXPOOL
- --rpc-ws-max-active-connections=80
- --data-storage-format=BONSAI
- --bootnodes=enode://ee7202c18150e21bf68a2e4f87590a273cda755dc68a66267dea175aaaf2dfe48b70a90356c00d05eb163b14f807f538199570e99a9d76451b953d0354506639@172.16.239.11:30303
- --min-gas-price=${MIN_GAS_PRICE}
restart: unless-stopped
node-4:
image: ${BESU_IMAGE}
container_name: besu-node-4
hostname: node-4
networks:
besu-network:
ipv4_address: 172.16.239.14
ports:
- '8549:8545'
volumes:
- ./nodes:/nodes
depends_on:
- node-1
command:
- --data-path=/nodes/node-4/data
- --genesis-file=/nodes/networkFiles/genesis.json
- --network-id=${NETWORK_ID}
- --rpc-http-enabled=true
- --rpc-http-host=0.0.0.0
- --rpc-http-port=8545
- --rpc-http-api=ETH,NET,WEB3,DEBUG,TRACE,TXPOOL
- --rpc-http-max-active-connections=80
- --rpc-http-cors-origins=*
- --host-allowlist=*
- --p2p-enabled=true
- --p2p-host=172.16.239.14
- --p2p-port=30303
- --rpc-ws-enabled=true
- --rpc-ws-host=0.0.0.0
- --rpc-ws-port=8546
- --rpc-ws-api=ETH,NET,WEB3,DEBUG,TRACE,TXPOOL
- --rpc-ws-max-active-connections=80
- --data-storage-format=BONSAI
- --bootnodes=enode://ee7202c18150e21bf68a2e4f87590a273cda755dc68a66267dea175aaaf2dfe48b70a90356c00d05eb163b14f807f538199570e99a9d76451b953d0354506639@172.16.239.11:30303
- --min-gas-price=${MIN_GAS_PRICE}
restart: unless-stopped
networks:
besu-network:
driver: bridge
ipam:
config:
- subnet: 172.16.239.0/24