2022-03-03 10:14:26 +01:00
|
|
|
version: "3.7"
|
|
|
|
|
|
|
|
services:
|
|
|
|
bsc-pruning:
|
|
|
|
image: bsc:local
|
|
|
|
container_name: bsc-pruning
|
|
|
|
entrypoint:
|
|
|
|
- bsc
|
|
|
|
- snapshot
|
|
|
|
- prune-state
|
|
|
|
restart: "no"
|
|
|
|
volumes:
|
|
|
|
- ./bsc-data:/root/.ethereum
|
|
|
|
- ./config.toml:/root/.ethereum/config.toml
|
|
|
|
|
|
|
|
bsc:
|
|
|
|
image: bsc:local
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
args:
|
|
|
|
- BSC_TAG=${BSC_TAG}
|
|
|
|
container_name: bsc
|
|
|
|
env_file: .env
|
|
|
|
entrypoint:
|
|
|
|
- docker-entrypoint.sh
|
|
|
|
- bsc
|
|
|
|
- --config
|
|
|
|
- "/root/.ethereum/config.toml"
|
|
|
|
- --port
|
|
|
|
- "${P2P_PORT}"
|
|
|
|
- --rpc.allow-unprotected-txs
|
|
|
|
- --http
|
|
|
|
- --http.addr
|
|
|
|
- "0.0.0.0"
|
|
|
|
- --http.port
|
|
|
|
- "${HTTP_PORT}"
|
2022-03-13 05:00:46 +01:00
|
|
|
- --http.rpcprefix
|
|
|
|
- "/"
|
2022-03-03 10:14:26 +01:00
|
|
|
- --http.corsdomain=*
|
|
|
|
- --http.vhosts=*
|
|
|
|
- --http.api
|
|
|
|
- "eth,net,web3,parlia,txpool"
|
|
|
|
- --ws
|
|
|
|
- --ws.addr
|
|
|
|
- "0.0.0.0"
|
|
|
|
- --ws.port
|
|
|
|
- "${WS_PORT}"
|
2022-03-13 05:00:46 +01:00
|
|
|
- --ws.rpcprefix
|
|
|
|
- "/"
|
2022-03-03 10:14:26 +01:00
|
|
|
- --ws.origins=*
|
|
|
|
- --ws.api
|
|
|
|
- "eth,net,web3,txpool"
|
|
|
|
- --txpool.pricelimit
|
|
|
|
- "1"
|
|
|
|
- --txpool.reannouncetime
|
|
|
|
- "1m"
|
|
|
|
- --txpool.locals
|
|
|
|
- "${TX_LOCAL_ADDR}"
|
|
|
|
- --cache
|
|
|
|
- "20480"
|
|
|
|
restart: always
|
|
|
|
stop_grace_period: 4m
|
|
|
|
stop_signal: SIGINT
|
|
|
|
ports:
|
|
|
|
# - ${HTTP_PORT}:${HTTP_PORT}
|
|
|
|
# - ${WS_PORT}:${WS_PORT}
|
|
|
|
- ${P2P_PORT}:${P2P_PORT}
|
|
|
|
volumes:
|
|
|
|
- ./bsc-data:/root/.ethereum
|
|
|
|
- ./config.toml:/root/.ethereum/config.toml
|
|
|
|
labels:
|
|
|
|
- "traefik.enable=true"
|
|
|
|
- "traefik.http.routers.bsc-http.middlewares=bsc-http-acl"
|
|
|
|
- "traefik.http.middlewares.bsc-http.headers.customrequestheaders.Access-Control-Allow-Origin=*"
|
|
|
|
- "traefik.http.middlewares.bsc-http-acl.ipwhitelist.sourcerange=127.0.0.1/32, ${ALLOW_FROM}"
|
|
|
|
- "traefik.http.routers.bsc-http.service=bsc-http"
|
|
|
|
- "traefik.http.routers.bsc-http.rule=Host(`${DOMAIN}`) && Path(`/bsc-http/`)"
|
|
|
|
- "traefik.http.routers.bsc-http.entrypoints=websecure"
|
|
|
|
- "traefik.http.routers.bsc-http.tls.certresolver=myresolver"
|
|
|
|
- "traefik.http.services.bsc-http.loadbalancer.server.port=${HTTP_PORT}"
|
|
|
|
- "traefik.http.routers.bsc-ws.middlewares=bsc-ws-acl"
|
|
|
|
- "traefik.http.middlewares.bsc-ws.headers.customrequestheaders.Access-Control-Allow-Origin=*"
|
|
|
|
- "traefik.http.middlewares.bsc-ws-acl.ipwhitelist.sourcerange=127.0.0.1/32, ${ALLOW_FROM}"
|
|
|
|
- "traefik.http.routers.bsc-ws.service=bsc-ws"
|
|
|
|
- "traefik.http.routers.bsc-ws.rule=Host(`${DOMAIN}`) && Path(`/bsc-ws/`)"
|
|
|
|
- "traefik.http.routers.bsc-ws.entrypoints=websecure"
|
|
|
|
- "traefik.http.routers.bsc-ws.tls.certresolver=myresolver"
|
|
|
|
- "traefik.http.services.bsc-ws.loadbalancer.server.port=${WS_PORT}"
|
|
|
|
networks:
|
|
|
|
- rpc
|
|
|
|
|
|
|
|
networks:
|
|
|
|
rpc:
|
|
|
|
name: rpc-shared-network
|