move health check inside startup script
This commit is contained in:
parent
2da03d7ed1
commit
9110258ffc
@ -11,14 +11,6 @@ services:
|
||||
- ../config/fixturenet-lotus/genesis/devgen.car:/devgen.car
|
||||
- $HOME/stack-orchestrator/app/data/config/fixturenet-lotus/genesis/.genesis-sectors:/root/.genesis-sectors
|
||||
- lotus-shared:/root/.lotus-shared
|
||||
healthcheck:
|
||||
# test: ["CMD-SHELL", "grep 'started ChainNotify channel' /var/log/lotus.log"]
|
||||
# test: ["CMD-SHELL", "[ -f /root/.lotus-shared/miner.addr ]"]
|
||||
test: ["CMD-SHELL", "[ -d /root/.lotus-miner-local-net ]"]
|
||||
interval: 10s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 60s
|
||||
entrypoint: ["sh", "/docker-entrypoint-scripts.d/setup-miner.sh"]
|
||||
ports:
|
||||
- "1234"
|
||||
@ -36,8 +28,7 @@ services:
|
||||
- ../config/fixturenet-lotus/genesis/devgen.car:/devgen.car
|
||||
- lotus-shared:/root/.lotus-shared
|
||||
depends_on:
|
||||
lotus-miner:
|
||||
condition: service_healthy
|
||||
- lotus-miner
|
||||
entrypoint: ["sh", "/docker-entrypoint-scripts.d/setup-node.sh"]
|
||||
ports:
|
||||
- "1234"
|
||||
@ -55,8 +46,7 @@ services:
|
||||
- ../config/fixturenet-lotus/genesis/devgen.car:/devgen.car
|
||||
- lotus-shared:/root/.lotus-shared
|
||||
depends_on:
|
||||
lotus-miner:
|
||||
condition: service_healthy
|
||||
- lotus-miner
|
||||
entrypoint: ["sh", "/docker-entrypoint-scripts.d/setup-node.sh"]
|
||||
ports:
|
||||
- "1234"
|
||||
|
||||
@ -2,8 +2,11 @@
|
||||
|
||||
lotus --version
|
||||
|
||||
# # remove old bootnode peer info if present
|
||||
# [ -f /root/.lotus-shared/miner.addr ] && rm /root/.lotus-shared/miner.addr
|
||||
# remove old bootnode peer info if present
|
||||
if [ -f /root/.lotus-shared/miner.addr ]; then
|
||||
rm /root/.lotus-shared/miner.addr
|
||||
fi
|
||||
|
||||
|
||||
##TODO: generate genesis files inside container instead of bundling in config dir
|
||||
##something like commands below should work, other scripts/compose will have to be updated to corresponding directories
|
||||
|
||||
@ -4,6 +4,13 @@ lotus --version
|
||||
|
||||
##TODO: paths can use values from lotus-env.env file
|
||||
|
||||
# Loop until the daemon is started
|
||||
echo "Waiting for miner to share peering info..."
|
||||
while [ ! -f /root/.lotus-shared/miner.addr ]; do
|
||||
sleep 5
|
||||
done
|
||||
echo "Resuming..."
|
||||
|
||||
# if not already initialized
|
||||
if [ ! -f /root/.lotus-local-net/config.toml ]; then
|
||||
# init node config
|
||||
|
||||
Loading…
Reference in New Issue
Block a user