2022-02-14 09:35:55 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# default to true in case it is not set
|
|
|
|
DEPLOY_SUBGRAPH="${DEPLOY_SUBGRAPH:-true}"
|
|
|
|
echo "deploy subgraph is ${DEPLOY_SUBGRAPH}"
|
|
|
|
|
|
|
|
if [ "${DEPLOY_SUBGRAPH}" = "true" ]
|
|
|
|
then
|
2023-11-21 14:55:49 +01:00
|
|
|
rm -f /ocean-subgraph/ready
|
2022-02-14 09:35:55 +01:00
|
|
|
echo "Waiting for contracts to be deployed"
|
|
|
|
while [ ! -f "/ocean-contracts/artifacts/ready" ]; do
|
|
|
|
sleep 2
|
|
|
|
done
|
|
|
|
export ADDRESS_FILE="/ocean-contracts/artifacts/address.json"
|
2022-02-17 11:59:55 +01:00
|
|
|
cd /usr/src/app/
|
2022-02-14 09:35:55 +01:00
|
|
|
npm run quickstart:barge
|
2023-11-21 14:55:49 +01:00
|
|
|
sleep 3
|
|
|
|
touch /ocean-subgraph/ready
|
2022-02-14 09:35:55 +01:00
|
|
|
fi
|
|
|
|
tail -f /dev/null
|