Skip to content

Commit 5918fa6

Browse files
authored
Add healthcheck to webapp (#294)
1 parent f5e3c10 commit 5918fa6

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ LOKOLE_EMAIL_SERVER_QUEUES_SAS_KEY=
1111
LOKOLE_EMAIL_SERVER_QUEUES_NAMESPACE=
1212
LOKOLE_SENDGRID_KEY=
1313
REGISTRATION_CREDENTIALS=admin:password
14-
WEBAPP_VERSION=0.5.6
14+
WEBAPP_VERSION=0.5.8
1515

1616
CLOUDBROWSER_PORT=10001
1717
AZURITE_PORT=10000

docker/integtest/0-wait-for-services.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,23 @@ wait_for_api() {
7373
exit 4
7474
}
7575

76+
wait_for_webapp() {
77+
local i
78+
79+
for i in $(seq 1 "${max_retries}"); do
80+
if curl -fs "http://nginx:8888/web/healthcheck/ping" >/dev/null; then
81+
log "Webapp is running"
82+
return
83+
fi
84+
log "Waiting for webapp (${i}/${max_retries})"
85+
sleep "${polling_interval_seconds}s"
86+
done
87+
88+
exit 4
89+
}
90+
7691
wait_for_rabbitmq
7792
wait_for_postgres
7893
wait_for_appinsights
7994
wait_for_api
95+
wait_for_webapp

0 commit comments

Comments
 (0)