Files
voice-call-service/scripts/healthcheck.sh
2026-05-29 01:06:47 +03:00

17 lines
368 B
Bash
Executable File

#!/bin/sh
# Exit immediately if any command fails
set -e
# Query the local health check endpoint
HEALTH_URL="http://127.0.0.1:47880/health"
response=$(curl -s -f "$HEALTH_URL")
# Verify the response contains 'status' equal to 'ok'
if echo "$response" | grep -q '"status":"ok"'; then
exit 0
else
echo "Health check failed: response: $response"
exit 1
fi