Skip to content

Commit

Permalink
fix: Fix sapphire-localnet startup on Mac Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
abukosek committed Jul 9, 2024
1 parent 88e1d9f commit ea76d83
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docker/common/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
# - BEACON_BACKEND: beacon epoch transition mode 'mock' (default) or 'default'
# - OASIS_SINGLE_COMPUTE_NODE: (default: true) if non-empty only run a single compute node

set -euo pipefail

export OASIS_DOCKER_NO_GATEWAY=${OASIS_DOCKER_NO_GATEWAY:-no}

export OASIS_NODE_LOG_LEVEL=${OASIS_NODE_LOG_LEVEL:-warn}
Expand All @@ -21,10 +19,12 @@ export OASIS_DOCKER_USE_TIMESTAMPS_IN_NOTICES=${OASIS_DOCKER_USE_TIMESTAMPS_IN_N

export OASIS_DOCKER_DEBUG_DISK_AND_CPU_USAGE=${OASIS_DOCKER_DEBUG_DISK_AND_CPU_USAGE:-no}

export OASIS_SINGLE_COMPUTE_NODE=${OASIS_SINGLE_COMPUTE_NODE-1}
export OASIS_SINGLE_COMPUTE_NODE=${OASIS_SINGLE_COMPUTE_NODE:-1}

OASIS_WEB3_GATEWAY_VERSION=$(${OASIS_WEB3_GATEWAY} -v | head -n1 | cut -d " " -f 3 | sed -r 's/^v//')
OASIS_CORE_VERSION=$(${OASIS_NODE} -v | head -n1 | cut -d " " -f 3 | sed -r 's/^v//')
VERSION=$(cat /VERSION)

echo "${PARATIME_NAME}-localnet ${VERSION} (oasis-core: ${OASIS_CORE_VERSION}, ${PARATIME_NAME}-paratime: ${PARATIME_VERSION}, oasis-web3-gateway: ${OASIS_WEB3_GATEWAY_VERSION})"
echo

Expand All @@ -36,6 +36,8 @@ OASIS_KM_SOCKET=${OASIS_NODE_DATADIR}/net-runner/network/keymanager-0/internal.s
OASIS_WEB3_GATEWAY_PID=""
OASIS_NODE_PID=""

set -euo pipefail

function cleanup {
if [[ -n "${OASIS_WEB3_GATEWAY_PID}" ]]; then
kill -9 ${OASIS_WEB3_GATEWAY_PID}
Expand Down

0 comments on commit ea76d83

Please sign in to comment.