Mount /root to simapp_data on chain start

This commit is contained in:
Simon Warta
2020-08-02 20:44:06 +02:00
parent aa31b6c870
commit 4ece47e0e0
6 changed files with 13 additions and 7 deletions
+2 -2
View File
@@ -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 \
Executable → Regular
+1 -1
View 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
Executable → Regular
View File
+6 -2
View 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"
+1 -1
View 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