From 9b60e34a57570f8fa358f2b50646b3ebb4e1ec26 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Wed, 18 Nov 2020 18:27:56 +0100 Subject: [PATCH] scripts: Update wasmd start.sh script --- scripts/wasmd/start.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/scripts/wasmd/start.sh b/scripts/wasmd/start.sh index 99a6c2448f..726fdbfdb7 100755 --- a/scripts/wasmd/start.sh +++ b/scripts/wasmd/start.sh @@ -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"