Skip to content

Commit

Permalink
persistent volumes, system is restartable
Browse files Browse the repository at this point in the history
  • Loading branch information
shaspitz committed Nov 11, 2023
1 parent bad1ff2 commit 90799a2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
13 changes: 12 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ services:
ipv4_address: '172.13.0.100'
ports:
- 8545:8545
volumes:
- geth-data-bootnode:/data
node1:
build:
context: .
Expand All @@ -23,6 +25,8 @@ services:
networks:
poa_net:
ipv4_address: '172.13.0.2'
volumes:
- geth-data-node1:/data
node2:
build:
context: .
Expand All @@ -34,11 +38,18 @@ services:
networks:
poa_net:
ipv4_address: '172.13.0.3'
volumes:
- geth-data-node2:/data

networks:
poa_net:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.13.0.0/16
- subnet: 172.13.0.0/16

volumes:
geth-data-bootnode:
geth-data-node1:
geth-data-node2:
4 changes: 1 addition & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
#!/bin/sh
set -exu

mkdir -p /db

GENESIS_L1_PATH="/genesis.json"
VERBOSITY=3
GETH_DATA_DIR=/db
GETH_DATA_DIR=/data
GETH_CHAINDATA_DIR="$GETH_DATA_DIR/geth/chaindata"
GETH_KEYSTORE_DIR="$GETH_DATA_DIR/keystore"
CHAIN_ID=$(cat "$GENESIS_L1_PATH" | jq -r .config.chainId)
Expand Down

0 comments on commit 90799a2

Please sign in to comment.