Files
unifi-voucher-manager/scripts/healthcheck.sh
etiennecollin d4d093e779 Initial commit
fix: double api call to get voucher details

style: removed ugly tab background
2025-08-06 22:55:45 +02:00

20 lines
589 B
Bash

#!/bin/sh
set -e
# Check backend health
echo "Checking backend on port $BACKEND_BIND_PORT..."
wget --no-verbose --tries=1 --spider --timeout=5 "http://localhost:$BACKEND_BIND_PORT/api/health" 2>/dev/null || {
echo "Backend health check failed on port $BACKEND_BIND_PORT"
exit 1
}
# Check frontend health
echo "Checking frontend on port $FRONTEND_BIND_PORT..."
wget --no-verbose --tries=1 --spider --timeout=5 "http://localhost:$FRONTEND_BIND_PORT" 2>/dev/null || {
echo "Frontend health check failed on port $FRONTEND_BIND_PORT"
exit 1
}
echo "Both services are healthy"
exit 0