diff --git a/run.sh b/run.sh index bf06a4c..3d3eabc 100755 --- a/run.sh +++ b/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 fi -echo "Starting API" cd /app/ -yarn start & - while true; do UPDATE_OPTS="" if [[ "true" == "${ONLY_NEW_REQUESTS:-true}" ]] && [[ ! -f "${DEPLOYMENTS_DIR}/autodeploy.state" ]]; then @@ -105,6 +102,12 @@ while true; do fi 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 ############" laconic-so undeploy-webapp-from-registry \