Nabarun Gogoi
b0aeff50bb
* Build MobyMask web-app at container build step * Fix web-app start script to use env variables in config * Replace variables in built web-app files * Use published mobymask-ui package from gitea * Use published react-peer/test-app from gitea * Remove local gitea publish TODO Former-commit-id: cf79f0de0adccbd8812ed23a3d0a013cd5af7ff8
21 lines
645 B
Bash
Executable File
21 lines
645 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"
|
|
|
|
# Use yq to create config.yml with environment variables
|
|
yq -n ".relayNodes = strenv(CERC_RELAY_NODES)" > /config/config.yml
|
|
|
|
/scripts/start-serving-app.sh
|