Skip to content

Commit

Permalink
Add healthcheck to webapp (#294)
Browse files Browse the repository at this point in the history
  • Loading branch information
c-w authored Jan 29, 2020
1 parent f5e3c10 commit 5918fa6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ LOKOLE_EMAIL_SERVER_QUEUES_SAS_KEY=
LOKOLE_EMAIL_SERVER_QUEUES_NAMESPACE=
LOKOLE_SENDGRID_KEY=
REGISTRATION_CREDENTIALS=admin:password
WEBAPP_VERSION=0.5.6
WEBAPP_VERSION=0.5.8

CLOUDBROWSER_PORT=10001
AZURITE_PORT=10000
Expand Down
16 changes: 16 additions & 0 deletions docker/integtest/0-wait-for-services.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,23 @@ wait_for_api() {
exit 4
}

wait_for_webapp() {
local i

for i in $(seq 1 "${max_retries}"); do
if curl -fs "http://nginx:8888/web/healthcheck/ping" >/dev/null; then
log "Webapp is running"
return
fi
log "Waiting for webapp (${i}/${max_retries})"
sleep "${polling_interval_seconds}s"
done

exit 4
}

wait_for_rabbitmq
wait_for_postgres
wait_for_appinsights
wait_for_api
wait_for_webapp

0 comments on commit 5918fa6

Please sign in to comment.