stack-orchestrator/app/data/config/watcher-mobymask-v2/test-app-start.sh
prathamesh0 8b11070870 Configuration fixes for mobymask-v2 stack for multiple deployments (#318)
* Fix contract deployment script in fixturenet-optimism stack

* Configure relay node's announce domain from env

* Configure relay peers list for the relay node from env

* Create and use peer ids from a mounted volume

* Fix command to create watcher config

* Fix mobymask-app deployment script

Former-commit-id: 882f0b16aa
2023-04-12 18:17:13 +05:30

25 lines
695 B
Bash
Executable File

#!/bin/sh
set -e
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x
fi
CERC_RELAY_NODES="${CERC_RELAY_NODES:-${DEFAULT_CERC_RELAY_NODES}}"
# If not set (or []), check the mounted volume for relay peer id
if [ -z "$CERC_RELAY_NODES" ] || [ "$CERC_RELAY_NODES" = "[]" ]; then
echo "CERC_RELAY_NODES not provided, taking from the mounted volume"
CERC_RELAY_NODES="[\"/ip4/127.0.0.1/tcp/9090/ws/p2p/$(jq -r '.id' /peers/relay-id.json)\"]"
fi
echo "Using CERC_RELAY_NODES $CERC_RELAY_NODES"
# Set relay nodes in config using CERC_RELAY_NODES
jq --argjson relayNodes "$CERC_RELAY_NODES" \
'.relayNodes = $relayNodes' \
./src/test-app-config.json > ./src/config.json
yarn build
serve -s build