Nabarun Gogoi
8add4671c0
* Add env variable for web apps config denyMultiaddrs * Add watcher config option for blacklisted multiaddrs * Update package versions * Use provided domain for relay multiaddr in peer config * Change delimeter while replacing deny multiaddrs list --------- Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com> Former-commit-id: b678a3ecb4b318ce26a39fd42f3ed160fd55041e
23 lines
799 B
Bash
Executable File
23 lines
799 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}}"
|
|
CERC_DENY_MULTIADDRS="${CERC_DENY_MULTIADDRS:-${DEFAULT_CERC_DENY_MULTIADDRS}}"
|
|
|
|
# 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
|
|
yq ".denyMultiaddrs = strenv(CERC_DENY_MULTIADDRS)" -i /config/config.yml
|
|
|
|
/scripts/start-serving-app.sh
|