Update health check endpoint in verify_stack_health function in start.sh and update.sh
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -631,7 +631,7 @@ verify_stack_health() {
|
|||||||
printf '%s\n' "$running_services" | grep -Fxq nginx && \
|
printf '%s\n' "$running_services" | grep -Fxq nginx && \
|
||||||
printf '%s\n' "$running_services" | grep -Fxq mongodb; then
|
printf '%s\n' "$running_services" | grep -Fxq mongodb; then
|
||||||
if docker compose "${compose_args[@]}" exec -T app python3 -c "import flask, pymongo" >/dev/null 2>&1; then
|
if docker compose "${compose_args[@]}" exec -T app python3 -c "import flask, pymongo" >/dev/null 2>&1; then
|
||||||
if curl -kfsS "https://127.0.0.1:$HTTPS_PORT_VALUE" >/dev/null 2>&1; then
|
if curl -kfsSL "https://127.0.0.1:$HTTPS_PORT_VALUE/health" >/dev/null 2>&1; then
|
||||||
echo "Health check passed."
|
echo "Health check passed."
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -511,8 +511,8 @@ verify_stack_health() {
|
|||||||
if printf '%s\n' "$running_services" | grep -Fxq app && \
|
if printf '%s\n' "$running_services" | grep -Fxq app && \
|
||||||
printf '%s\n' "$running_services" | grep -Fxq nginx && \
|
printf '%s\n' "$running_services" | grep -Fxq nginx && \
|
||||||
printf '%s\n' "$running_services" | grep -Fxq mongodb; then
|
printf '%s\n' "$running_services" | grep -Fxq mongodb; then
|
||||||
# Primary check: HTTP endpoint responds (most reliable)
|
# Primary check: health endpoint responds (most reliable)
|
||||||
if curl -kfsS "https://127.0.0.1:$https_port" >/dev/null 2>&1; then
|
if curl -kfsSL "https://127.0.0.1:$https_port/health" >/dev/null 2>&1; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user