Restart API if needed.
This commit is contained in:
parent
9fe733306a
commit
819b691249
9
run.sh
9
run.sh
@ -94,10 +94,7 @@ if [[ -n "$IMAGE_REGISTRY_CREDS" ]]; then
|
|||||||
docker login --password "$IMAGE_REGISTRY_CREDS" --username ${IMAGE_REGISTRY_USER:-ANY} $IMAGE_REGISTRY
|
docker login --password "$IMAGE_REGISTRY_CREDS" --username ${IMAGE_REGISTRY_USER:-ANY} $IMAGE_REGISTRY
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Starting API"
|
|
||||||
cd /app/
|
cd /app/
|
||||||
yarn start &
|
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
UPDATE_OPTS=""
|
UPDATE_OPTS=""
|
||||||
if [[ "true" == "${ONLY_NEW_REQUESTS:-true}" ]] && [[ ! -f "${DEPLOYMENTS_DIR}/autodeploy.state" ]]; then
|
if [[ "true" == "${ONLY_NEW_REQUESTS:-true}" ]] && [[ ! -f "${DEPLOYMENTS_DIR}/autodeploy.state" ]]; then
|
||||||
@ -105,6 +102,12 @@ while true; do
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "=============================================================="
|
echo "=============================================================="
|
||||||
|
ps -ef | grep node | grep 'yarn start' >/dev/null
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "########### STARTING API ############"
|
||||||
|
echo "Starting API"
|
||||||
|
yarn start &
|
||||||
|
fi
|
||||||
|
|
||||||
echo "########### UNDEPLOY ############"
|
echo "########### UNDEPLOY ############"
|
||||||
laconic-so undeploy-webapp-from-registry \
|
laconic-so undeploy-webapp-from-registry \
|
||||||
|
Loading…
Reference in New Issue
Block a user