chore(ops): harden deployment and runtime setup
This commit is contained in:
parent
1d7e7c41c9
commit
c35bd5877e
30 changed files with 534 additions and 61 deletions
14
scripts/healthcheck.sh
Executable file
14
scripts/healthcheck.sh
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env sh
|
||||
set -eu
|
||||
|
||||
BASE_URL="${BASE_URL:-http://localhost:3010}"
|
||||
HEALTH_URL="${BASE_URL%/}/api/health"
|
||||
|
||||
echo "Checking ${HEALTH_URL}"
|
||||
response="$(curl -fsS "$HEALTH_URL")"
|
||||
echo "$response"
|
||||
|
||||
case "$response" in
|
||||
*'"status":"ok"'*) exit 0 ;;
|
||||
*) echo "Healthcheck failed" >&2; exit 1 ;;
|
||||
esac
|
||||
Loading…
Add table
Add a link
Reference in a new issue