feat: initial commit at project root
This commit is contained in:
16
scripts/healthcheck.sh
Executable file
16
scripts/healthcheck.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user