Modfify template.

This commit is contained in:
Your Name
2025-04-21 18:09:19 +12:00
parent b49bc0c5de
commit 3b3f1cf392
8 changed files with 120 additions and 102 deletions

View File

@ -8,16 +8,11 @@ source "$(dirname "$0")/_common.sh"
load_env "$1" || exit 1
# check if the service is running
if ! _is_container_running $CONTAINER_NAME; then
echo "Service is not running - did not find container $CONTAINER_NAME."
exit 1
fi
_is_container_running $CONTAINER_NAME || die "Service is not running - did not find container $CONTAINER_NAME."
# 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 - did not get OK response from /health endpoint."
exit 1
fi
# check if the service is healthy
curl -s -X GET http://localhost:${HOST_PORT}/health | grep -q "OK" \
|| die "Service is not healthy - did not get OK response from /health endpoint."
echo "Service is healthy"
exit 0