mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-11 14:09:15 +00:00
scripts: Update wasmd start.sh script
This commit is contained in:
parent
feb4caddc7
commit
9b60e34a57
@ -3,9 +3,10 @@ set -o errexit -o nounset -o pipefail
|
||||
command -v shellcheck > /dev/null && shellcheck "$0"
|
||||
|
||||
# Please keep this in sync with the Ports overview in HACKING.md
|
||||
# Tendermint port (26657) and p2p port (26656) are not exposed since we don't need them for testing
|
||||
TENDERMINT_PORT_GUEST="26657"
|
||||
TENDERMINT_PORT_HOST="26659"
|
||||
LCD_API_PORT_GUEST="1317"
|
||||
LCD_API_PORT_HOST="1317"
|
||||
LCD_API_PORT_HOST="1319"
|
||||
|
||||
SCRIPT_DIR="$(realpath "$(dirname "$0")")"
|
||||
# shellcheck source=./env
|
||||
@ -16,7 +17,6 @@ TMP_DIR=$(mktemp -d "${TMPDIR:-/tmp}/wasmd.XXXXXXXXX")
|
||||
chmod 777 "$TMP_DIR"
|
||||
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
|
||||
@ -24,6 +24,7 @@ docker volume rm -f wasmd_data
|
||||
# This starts up wasmd
|
||||
docker run --rm \
|
||||
--name "$CONTAINER_NAME" \
|
||||
-p "$TENDERMINT_PORT_HOST":"$TENDERMINT_PORT_GUEST" \
|
||||
-p "$LCD_API_PORT_HOST":"$LCD_API_PORT_GUEST" \
|
||||
--mount type=bind,source="$SCRIPT_DIR/template",target=/template \
|
||||
--mount type=volume,source=wasmd_data,target=/root \
|
||||
@ -53,7 +54,7 @@ fi
|
||||
# --laddr "tcp://0.0.0.0:$LCD_API_PORT_GUEST" \
|
||||
# > "$REST_SERVER_LOGFILE" &
|
||||
|
||||
# echo "rest server running on http://localhost:$LCD_API_PORT_HOST and logging into $REST_SERVER_LOGFILE"
|
||||
# echo "rest server running on http://localhost:$LCD_API_PORT_HOST and logging into $REST_SERVER_LOGFILE
|
||||
|
||||
if [ -n "${CI:-}" ]; then
|
||||
# Give process some time to come alive. No idea why this helps. Needed for CI.
|
||||
@ -62,6 +63,3 @@ if [ -n "${CI:-}" ]; then
|
||||
# Follow the logs in CI's background job
|
||||
tail -f "$WASMD_LOGFILE"
|
||||
fi
|
||||
|
||||
# Debug rest server start
|
||||
# sleep 3 && cat "$REST_SERVER_LOGFILE"
|
||||
|
Loading…
x
Reference in New Issue
Block a user