Remove unnecessary check on watcher endpoint
This commit is contained in:
parent
8a054a979c
commit
a67a751661
@ -15,12 +15,7 @@ services:
|
|||||||
CERC_RELAY_NODES: ${CERC_RELAY_NODES}
|
CERC_RELAY_NODES: ${CERC_RELAY_NODES}
|
||||||
CERC_BUILD_DIR: "@cerc-io/mobymask-ui/build"
|
CERC_BUILD_DIR: "@cerc-io/mobymask-ui/build"
|
||||||
working_dir: /scripts
|
working_dir: /scripts
|
||||||
# Waits for watcher server to be up before app build
|
command: ["sh", "mobymask-app-start.sh"]
|
||||||
# Required when running with watcher stack to get deployed contract address
|
|
||||||
command:
|
|
||||||
- sh
|
|
||||||
- -c
|
|
||||||
- ./wait-for-it.sh -h ${CERC_WATCHER_HOST:-$${DEFAULT_CERC_WATCHER_HOST}} -p ${CERC_WATCHER_PORT:-$${DEFAULT_CERC_WATCHER_PORT}} -s -t 0 -- ./mobymask-app-start.sh
|
|
||||||
volumes:
|
volumes:
|
||||||
- ../config/wait-for-it.sh:/scripts/wait-for-it.sh
|
- ../config/wait-for-it.sh:/scripts/wait-for-it.sh
|
||||||
- ../config/watcher-mobymask-v2/mobymask-app-start.sh:/scripts/mobymask-app-start.sh
|
- ../config/watcher-mobymask-v2/mobymask-app-start.sh:/scripts/mobymask-app-start.sh
|
||||||
@ -51,12 +46,7 @@ services:
|
|||||||
CERC_RELAY_NODES: ${CERC_RELAY_NODES}
|
CERC_RELAY_NODES: ${CERC_RELAY_NODES}
|
||||||
CERC_BUILD_DIR: "@cerc-io/mobymask-ui-lxdao/build"
|
CERC_BUILD_DIR: "@cerc-io/mobymask-ui-lxdao/build"
|
||||||
working_dir: /scripts
|
working_dir: /scripts
|
||||||
# Waits for watcher server to be up before app build
|
command: ["sh", "mobymask-app-start.sh"]
|
||||||
# Required when running with watcher stack to get deployed contract address
|
|
||||||
command:
|
|
||||||
- sh
|
|
||||||
- -c
|
|
||||||
- ./wait-for-it.sh -h ${CERC_WATCHER_HOST:-$${DEFAULT_CERC_WATCHER_HOST}} -p ${CERC_WATCHER_PORT:-$${DEFAULT_CERC_WATCHER_PORT}} -s -t 0 -- ./mobymask-app-start.sh
|
|
||||||
volumes:
|
volumes:
|
||||||
- ../config/wait-for-it.sh:/scripts/wait-for-it.sh
|
- ../config/wait-for-it.sh:/scripts/wait-for-it.sh
|
||||||
- ../config/watcher-mobymask-v2/mobymask-app-start.sh:/scripts/mobymask-app-start.sh
|
- ../config/watcher-mobymask-v2/mobymask-app-start.sh:/scripts/mobymask-app-start.sh
|
||||||
|
@ -10,10 +10,7 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||||
CERC_RELAY_NODES: ${CERC_RELAY_NODES}
|
CERC_RELAY_NODES: ${CERC_RELAY_NODES}
|
||||||
command:
|
command: ["sh", "test-app-start.sh"]
|
||||||
- sh
|
|
||||||
- -c
|
|
||||||
- ./wait-for-it.sh -h ${CERC_WATCHER_HOST:-$${DEFAULT_CERC_WATCHER_HOST}} -p ${CERC_WATCHER_PORT:-$${DEFAULT_CERC_WATCHER_PORT}} -s -t 0 -- ./test-app-start.sh
|
|
||||||
volumes:
|
volumes:
|
||||||
- ../config/wait-for-it.sh:/scripts/wait-for-it.sh
|
- ../config/wait-for-it.sh:/scripts/wait-for-it.sh
|
||||||
- ../config/watcher-mobymask-v2/test-app-start.sh:/scripts/test-app-start.sh
|
- ../config/watcher-mobymask-v2/test-app-start.sh:/scripts/test-app-start.sh
|
||||||
|
@ -17,15 +17,19 @@ fi
|
|||||||
|
|
||||||
echo "Using CERC_RELAY_NODES $CERC_RELAY_NODES"
|
echo "Using CERC_RELAY_NODES $CERC_RELAY_NODES"
|
||||||
|
|
||||||
# Use config from mounted volume if available (when running web-app along with watcher stack)
|
if [ -z "$CERC_DEPLOYED_CONTRACT" ]; then
|
||||||
if [ -f /server/config.json ]; then
|
echo "Taking deployed contract details from env"
|
||||||
|
else
|
||||||
|
# Use config from mounted volume (when running web-app along with watcher stack)
|
||||||
echo "Taking config for deployed contract from mounted volume"
|
echo "Taking config for deployed contract from mounted volume"
|
||||||
|
while [ ! -f /server/config.json ]; do
|
||||||
|
echo "Config not found, retrying after 5 seconds"
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
|
||||||
# Get deployed contract address and chain id
|
# Get deployed contract address and chain id
|
||||||
CERC_DEPLOYED_CONTRACT=$(jq -r '.address' /server/config.json | tr -d '"')
|
CERC_DEPLOYED_CONTRACT=$(jq -r '.address' /server/config.json | tr -d '"')
|
||||||
CERC_CHAIN_ID=$(jq -r '.chainId' /server/config.json)
|
CERC_CHAIN_ID=$(jq -r '.chainId' /server/config.json)
|
||||||
else
|
|
||||||
echo "Taking deployed contract details from env"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Use yq to create config.yml with environment variables
|
# Use yq to create config.yml with environment variables
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
# Defaults
|
# Defaults
|
||||||
|
|
||||||
# Watcher endpoint
|
# Watcher endpoint
|
||||||
DEFAULT_CERC_WATCHER_HOST="mobymask-watcher-server"
|
|
||||||
DEFAULT_CERC_WATCHER_PORT=3001
|
|
||||||
DEFAULT_CERC_APP_WATCHER_URL="http://localhost:3001"
|
DEFAULT_CERC_APP_WATCHER_URL="http://localhost:3001"
|
||||||
|
|
||||||
# Set of relay peers to connect to from the relay node
|
# Set of relay peers to connect to from the relay node
|
||||||
|
@ -28,10 +28,6 @@ Create and update an env file to be used in the next step ([defaults](../../conf
|
|||||||
|
|
||||||
# Also add if running MobyMask app:
|
# Also add if running MobyMask app:
|
||||||
|
|
||||||
# External watcher endpoint (to check if watcher is up)
|
|
||||||
CERC_WATCHER_HOST=
|
|
||||||
CERC_WATCHER_PORT=
|
|
||||||
|
|
||||||
# Watcher endpoint used by the app for GQL queries
|
# Watcher endpoint used by the app for GQL queries
|
||||||
CERC_APP_WATCHER_URL="http://127.0.0.1:3001"
|
CERC_APP_WATCHER_URL="http://127.0.0.1:3001"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user