ocean-subgraph/docker-entrypoint.sh
Alex Coseru f3b501b728
Feature/fix scripts (#331)
* fix scripts
2022-02-17 12:59:55 +02:00

18 lines
436 B
Bash
Executable File

#!/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
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"
cd /usr/src/app/
npm run quickstart:barge
fi
tail -f /dev/null