Mount /root to simapp_data on chain start
This commit is contained in:
parent
aa31b6c870
commit
4ece47e0e0
@ -9,8 +9,8 @@ source "$SCRIPT_DIR"/env
|
||||
|
||||
rm -rf "$SCRIPT_DIR/template"
|
||||
mkdir "$SCRIPT_DIR/template"
|
||||
cp setup.sh "$SCRIPT_DIR/template/"
|
||||
cp run_simd.sh "$SCRIPT_DIR/template/"
|
||||
cp setup.sh "$SCRIPT_DIR/template/" && chmod +x "$SCRIPT_DIR/template/setup.sh"
|
||||
cp run_simd.sh "$SCRIPT_DIR/template/" && chmod +x "$SCRIPT_DIR/template/run_simd.sh"
|
||||
|
||||
# The usage of the accounts below is documented in README.md of this directory
|
||||
docker run --rm \
|
||||
|
||||
2
scripts/simapp/run_simd.sh
Executable file → Normal file
2
scripts/simapp/run_simd.sh
Executable file → Normal file
@ -2,6 +2,6 @@
|
||||
set -o errexit -o nounset -o pipefail
|
||||
command -v shellcheck > /dev/null && shellcheck "$0"
|
||||
|
||||
cp -R "/template/.simapp" /root
|
||||
mkdir -p /root/log
|
||||
|
||||
simd start --rpc.laddr tcp://0.0.0.0:26657 --trace
|
||||
|
||||
0
scripts/simapp/setup.sh
Executable file → Normal file
0
scripts/simapp/setup.sh
Executable file → Normal file
@ -15,12 +15,16 @@ echo "Using temporary dir $TMP_DIR"
|
||||
SIMD_LOGFILE="$TMP_DIR/simd.log"
|
||||
PORT=26657
|
||||
|
||||
# Use a fresh volume for every start
|
||||
docker volume rm -f simapp_data
|
||||
|
||||
docker run --rm \
|
||||
--name "$CONTAINER_NAME" \
|
||||
-p "$PORT:$PORT" \
|
||||
--mount type=bind,source="$SCRIPT_DIR/template",target=/root \
|
||||
--mount type=bind,source="$SCRIPT_DIR/template",target=/template \
|
||||
--mount type=volume,source=simapp_data,target=/root \
|
||||
"$REPOSITORY:$VERSION" \
|
||||
./run_simd.sh \
|
||||
/template/run_simd.sh \
|
||||
> "$SIMD_LOGFILE" &
|
||||
|
||||
echo "simd running on http://localhost:$PORT and logging into $SIMD_LOGFILE"
|
||||
|
||||
@ -2,6 +2,6 @@
|
||||
set -o errexit -o nounset -o pipefail
|
||||
command -v shellcheck > /dev/null && shellcheck "$0"
|
||||
|
||||
cp -R "/template/.simapp" /root
|
||||
mkdir -p /root/log
|
||||
|
||||
simd start --rpc.laddr tcp://0.0.0.0:26657 --trace
|
||||
|
||||
@ -17,9 +17,11 @@ echo "Using temporary dir $TMP_DIR"
|
||||
WASMD_LOGFILE="$TMP_DIR/wasmd.log"
|
||||
REST_SERVER_LOGFILE="$TMP_DIR/rest-server.log"
|
||||
|
||||
# Use a fresh volume for every start
|
||||
docker volume rm -f wasmd_data
|
||||
|
||||
# This starts up wasmd
|
||||
# The Tendermint port (26657) and the p2p port (26656) are not exposed since we don't need for testing
|
||||
docker volume rm -f wasmd_data
|
||||
docker run --rm \
|
||||
--name "$CONTAINER_NAME" \
|
||||
-p "$REST_PORT_HOST":"$REST_PORT_GUEST" \
|
||||
|
||||
Loading…
Reference in New Issue
Block a user