aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-fe/sdc-frontend/artifacts/scripts/ready-probe.sh
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-fe/sdc-frontend/artifacts/scripts/ready-probe.sh')
-rw-r--r--catalog-fe/sdc-frontend/artifacts/scripts/ready-probe.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/catalog-fe/sdc-frontend/artifacts/scripts/ready-probe.sh b/catalog-fe/sdc-frontend/artifacts/scripts/ready-probe.sh
new file mode 100644
index 0000000000..65434716a1
--- /dev/null
+++ b/catalog-fe/sdc-frontend/artifacts/scripts/ready-probe.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+health_check_http_code=$(curl -k --max-time 5 -o /dev/null -w '%{http_code}' -X GET --header "Accept: application/json" "http://127.0.0.1:8181//sdc1/rest/healthCheck")
+if [ "$health_check_http_code" -eq 200 ]; then
+ exit 0
+else
+ echo "Health check http status: $health_check_http_code"
+ exit 1
+fi \ No newline at end of file