Separated out run_all from run_wasmd to execute as two processes

This commit is contained in:
Ethan Frey 2020-01-22 15:29:24 +01:00
parent 0380eadcf3
commit d1989df0eb
5 changed files with 21 additions and 20 deletions

View File

@ -51,7 +51,7 @@ docker run --rm -it \
# This will start both wasmd and wasmcli rest-server, only wasmcli output is shown on the screen
docker run --rm -it -p 26657:26657 -p 26656:26656 -p 1317:1317 \
--mount type=volume,source=wasmd_data,target=/root \
wasmd:manual ./run.sh
wasmd:manual ./run_all.sh
# view wasmd logs in another shell
docker run --rm -it \
@ -80,12 +80,12 @@ docker volume rm -f wasmd_data
docker run --rm -it -p 26657:26657 -p 26656:26656 -p 1317:1317 \
--mount type=bind,source=$(pwd)/template,target=/template \
--mount type=volume,source=wasmd_data,target=/root \
wasmd:manual ./run.sh /template
wasmd:manual ./run_all.sh /template
# RESTART CHAIN with existing state
docker run --rm -it -p 26657:26657 -p 26656:26656 -p 1317:1317 \
--mount type=volume,source=wasmd_data,target=/root \
wasmd:manual ./run.sh
wasmd:manual ./run_all.sh
# view wasmd logs in another shell
docker run --rm -it \

0
docker/logs.sh Normal file → Executable file
View File

View File

@ -1,17 +0,0 @@
#!/bin/bash
if test -n "$1"; then
# need -R not -r to copy hidden files
cp -R "$1/.wasmd" /root
cp -R "$1/.wasmcli" /root
fi
echo Starting Wasmd...
mkdir -p /root/log
wasmd start --rpc.laddr tcp://0.0.0.0:26657 >> /root/log/wasmd.log &
sleep 4
echo Starting Rest Server...
wasmcli rest-server --laddr tcp://0.0.0.0:1317 --trust-node

8
docker/run_all.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
./run_wasmd.sh >> /root/log/wasmd.log &
sleep 4
echo Starting Rest Server...
wasmcli rest-server --laddr tcp://0.0.0.0:1317 --trust-node

10
docker/run_wasmd.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
if test -n "$1"; then
# need -R not -r to copy hidden files
cp -R "$1/.wasmd" /root
cp -R "$1/.wasmcli" /root
fi
mkdir -p /root/log
wasmd start --rpc.laddr tcp://0.0.0.0:26657