2022-03-03 10:14:26 +01:00
|
|
|
version: "3.7"
|
|
|
|
|
|
|
|
services:
|
|
|
|
bsc-pruning:
|
|
|
|
image: bsc:local
|
|
|
|
container_name: bsc-pruning
|
|
|
|
entrypoint:
|
|
|
|
- bsc
|
2022-08-02 09:50:08 +02:00
|
|
|
- --datadir
|
|
|
|
- "/bsc/.ethereum"
|
2022-03-03 10:14:26 +01:00
|
|
|
- snapshot
|
|
|
|
- prune-state
|
|
|
|
restart: "no"
|
|
|
|
volumes:
|
2022-08-02 09:50:08 +02:00
|
|
|
- ./bsc-data:/bsc/.ethereum
|
|
|
|
- ./config.toml:/bsc/config/config.toml
|
2022-03-03 10:14:26 +01:00
|
|
|
|
|
|
|
bsc:
|
|
|
|
image: bsc:local
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
args:
|
|
|
|
- BSC_TAG=${BSC_TAG}
|
|
|
|
container_name: bsc
|
|
|
|
env_file: .env
|
|
|
|
entrypoint:
|
|
|
|
- docker-entrypoint.sh
|
|
|
|
- bsc
|
2022-08-02 09:50:08 +02:00
|
|
|
- --datadir
|
|
|
|
- "/bsc/.ethereum"
|
2022-03-03 10:14:26 +01:00
|
|
|
- --config
|
2022-08-02 09:50:08 +02:00
|
|
|
- "/bsc/config/config.toml"
|
2022-03-03 10:14:26 +01:00
|
|
|
- --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:
|
2022-08-02 09:50:08 +02:00
|
|
|
- ./bsc-data:/bsc/.ethereum
|
|
|
|
- ./config.toml:/bsc/config/config.toml
|
2022-03-03 10:14:26 +01:00
|
|
|
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
|