Skip to content

Commit

Permalink
fixed paths after update to v1.1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
feshchenkod committed Aug 2, 2022
1 parent 51cc033 commit 0fe9c92
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 15 deletions.
14 changes: 9 additions & 5 deletions bsc/docker-compose.no-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ services:
container_name: bsc-pruning
entrypoint:
- bsc
- --datadir
- "/bsc/.ethereum"
- snapshot
- prune-state
restart: "no"
volumes:
- ./bsc-data:/root/.ethereum
- ./config.toml:/root/.ethereum/config.toml
- ./bsc-data:/bsc/.ethereum
- ./config.toml:/bsc/config/config.toml

bsc:
image: bsc:local
Expand All @@ -24,8 +26,10 @@ services:
entrypoint:
- docker-entrypoint.sh
- bsc
- --datadir
- "/bsc/.ethereum"
- --config
- "/root/.ethereum/config.toml"
- "/bsc/config/config.toml"
- --port
- "${P2P_PORT}"
- --rpc.allow-unprotected-txs
Expand Down Expand Up @@ -62,5 +66,5 @@ services:
- ${WS_PORT}:${WS_PORT}
- ${P2P_PORT}:${P2P_PORT}
volumes:
- ./bsc-data:/root/.ethereum
- ./config.toml:/root/.ethereum/config.toml
- ./bsc-data:/bsc/.ethereum
- ./config.toml:/bsc/config/config.toml
14 changes: 9 additions & 5 deletions bsc/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ services:
container_name: bsc-pruning
entrypoint:
- bsc
- --datadir
- "/bsc/.ethereum"
- snapshot
- prune-state
restart: "no"
volumes:
- ./bsc-data:/root/.ethereum
- ./config.toml:/root/.ethereum/config.toml
- ./bsc-data:/bsc/.ethereum
- ./config.toml:/bsc/config/config.toml

bsc:
image: bsc:local
Expand All @@ -24,8 +26,10 @@ services:
entrypoint:
- docker-entrypoint.sh
- bsc
- --datadir
- "/bsc/.ethereum"
- --config
- "/root/.ethereum/config.toml"
- "/bsc/config/config.toml"
- --port
- "${P2P_PORT}"
- --rpc.allow-unprotected-txs
Expand Down Expand Up @@ -66,8 +70,8 @@ services:
# - ${WS_PORT}:${WS_PORT}
- ${P2P_PORT}:${P2P_PORT}
volumes:
- ./bsc-data:/root/.ethereum
- ./config.toml:/root/.ethereum/config.toml
- ./bsc-data:/bsc/.ethereum
- ./config.toml:/bsc/config/config.toml
labels:
- "traefik.enable=true"
- "traefik.http.routers.bsc-http.middlewares=bsc-http-acl"
Expand Down
10 changes: 5 additions & 5 deletions bsc/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/sh
set -x

if [ ! -f /root/.ethereum/setupdone ]; then
wget -O /root/mainnet.zip "https://github.com/bnb-chain/bsc/releases/download/${BSC_TAG}/mainnet.zip"
unzip -o -j /root/mainnet.zip "mainnet/genesis.json" -d /root/.ethereum/
bsc init /root/.ethereum/genesis.json
touch /root/.ethereum/setupdone
if [ ! -f /bsc/config/setupdone ]; then
wget -O /bsc/mainnet.zip "https://github.com/bnb-chain/bsc/releases/download/${BSC_TAG}/mainnet.zip"
unzip -o -j /bsc/mainnet.zip "mainnet/genesis.json" -d /bsc/config/
bsc --datadir /bsc/.ethereum init /bsc/config/genesis.json
touch /bsc/config/setupdone
fi

exec "$@"

0 comments on commit 0fe9c92

Please sign in to comment.