2025-04-21 12:40:23 +12:00

25 lines
512 B
Bash

#!/bin/bash
# Source common functions
source "$(dirname "$0")/_common.sh"
# Load environment variables
load_env "$1" || exit 1
# check if the service is running
if ! docker ps | grep -q "$CONTAINER_NAME"; then
echo "Service is not running"
exit 1
fi
echo "Service is running"
# curl -s -X GET http://localhost:8080/health | grep -q "OK"
if ! curl -s -X GET http://localhost:${HOST_PORT}/health | grep -q "OK"; then
echo "Service is not healthy"
exit 1
fi
echo "Service is healthy"
return 0