update
This commit is contained in:
@@ -2,7 +2,7 @@ services:
|
|||||||
|
|
||||||
|
|
||||||
goat-testnet:
|
goat-testnet:
|
||||||
image: ghcr.io/goatnetwork/goat-geth:v0.1.0
|
image: ghcr.io/goatnetwork/goat-geth:v0.1.1
|
||||||
stop_grace_period: 5m
|
stop_grace_period: 5m
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
healthcheck:
|
healthcheck:
|
||||||
@@ -26,7 +26,7 @@ services:
|
|||||||
- "GETH_WS_PORT=8545"
|
- "GETH_WS_PORT=8545"
|
||||||
- "GETH_NAT=extip:${IP}"
|
- "GETH_NAT=extip:${IP}"
|
||||||
- "GETH_SYNCMODE=full"
|
- "GETH_SYNCMODE=full"
|
||||||
- "GETH_BOOTNODES=enode://0d41d098846751f0f90ea66e4d7e6741591e9c4bfb6e75d14f78ca3702415fb795adad64b2805f428c86f6ae2ee5315322301e02c63c917f92756a909679599e@52.12.249.134:30303"
|
# - "GETH_BOOTNODES=enode://0d41d098846751f0f90ea66e4d7e6741591e9c4bfb6e75d14f78ca3702415fb795adad64b2805f428c86f6ae2ee5315322301e02c63c917f92756a909679599e@52.12.249.134:30303"
|
||||||
entrypoint: /entrypoint.sh
|
entrypoint: /entrypoint.sh
|
||||||
expose:
|
expose:
|
||||||
- 8545
|
- 8545
|
||||||
@@ -36,8 +36,8 @@ services:
|
|||||||
- "18141:18141/udp"
|
- "18141:18141/udp"
|
||||||
volumes:
|
volumes:
|
||||||
- "goat-testnet:/root/.ethereum"
|
- "goat-testnet:/root/.ethereum"
|
||||||
- ./goat/testnet:/genesis
|
# - ./goat/testnet:/genesis
|
||||||
- ./goat/geth-entrypoint.sh:/entrypoint.sh
|
- ./goat/testnet3/geth-entrypoint.sh:/entrypoint.sh
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.middlewares.goat-testnet-stripprefix.stripprefix.prefixes=/goat-testnet"
|
- "traefik.http.middlewares.goat-testnet-stripprefix.stripprefix.prefixes=/goat-testnet"
|
||||||
@@ -50,7 +50,7 @@ services:
|
|||||||
- chains
|
- chains
|
||||||
|
|
||||||
goat-testnet-node:
|
goat-testnet-node:
|
||||||
image: ghcr.io/goatnetwork/goat:v0.1.0
|
image: ghcr.io/goatnetwork/goat:v0.1.1
|
||||||
stop_grace_period: 30s
|
stop_grace_period: 30s
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
entrypoint: /entrypoint.sh
|
entrypoint: /entrypoint.sh
|
||||||
@@ -59,8 +59,8 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- "goat-testnet-node:/goat"
|
- "goat-testnet-node:/goat"
|
||||||
- "goat-testnet:/geth"
|
- "goat-testnet:/geth"
|
||||||
- ./goat/testnet:/genesis
|
# - ./goat/testnet:/genesis
|
||||||
- ./goat/node-entrypoint.sh:/entrypoint.sh
|
- ./goat/testnet3/node-entrypoint.sh:/entrypoint.sh
|
||||||
depends_on:
|
depends_on:
|
||||||
- goat-testnet
|
- goat-testnet
|
||||||
networks:
|
networks:
|
||||||
|
|||||||
8
goat/testnet3/geth-entrypoint.sh
Normal file
8
goat/testnet3/geth-entrypoint.sh
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
if [ ! -d "/root/.ethereum/geth/chaindata" ]; then
|
||||||
|
geth init /genesis/geth.json
|
||||||
|
else
|
||||||
|
echo "Chain already initialized."
|
||||||
|
fi
|
||||||
|
|
||||||
|
geth --goat=testnet3
|
||||||
26
goat/testnet3/node-entrypoint.sh
Normal file
26
goat/testnet3/node-entrypoint.sh
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
if [ ! -d "/root/.ethereum/geth/chaindata" ]; then
|
||||||
|
geth init /genesis/geth.json
|
||||||
|
else
|
||||||
|
echo "Chain already initialized."
|
||||||
|
fi
|
||||||
|
|
||||||
|
geth
|
||||||
|
root@rpc-jp-1:~/rpc# cat goat/node-entrypoint.sh
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Custom initialization steps go here
|
||||||
|
echo "Starting initialization steps..."
|
||||||
|
|
||||||
|
# Check if the genesis.json file exists; if not, initialize and copy it
|
||||||
|
if [ ! -f /goat/config/genesis.json ]; then
|
||||||
|
echo "Initializing goatd..."
|
||||||
|
goatd init --home /goat testnet
|
||||||
|
echo "Copying genesis file..."
|
||||||
|
cp /genesis/goat.json /goat/config/genesis.json
|
||||||
|
else
|
||||||
|
echo "Genesis file already exists; skipping initialization."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Pass control to the final command specified in docker-compose.yml
|
||||||
|
goatd start --home /goat --chain-id=goat-testnet3 --goat.geth /geth/geth.ipc --api.enable --api.address=tcp://0.0.0.0:1317 --p2p.persistent_peers c9befb6b8421b46ec5cda76171a8cf7539af20fc@52.12.249.134:26656 --p2p.external-address $IP:40258 --p2p.laddr 0.0.0.0:40258
|
||||||
Reference in New Issue
Block a user