deploy.sh [dev|prod <tag>] handles git pull or tag checkout, reinstalls deps only if requirements.txt changed, restarts the service, runs a smoke test, and auto-rolls back on failure. rollback.sh reverts to the checkpoint written by the last deploy (or to an explicit commit). health-check.sh is a one-liner for "is the app alive?" checks. Replaces the placeholder-config rsync-based deploy-to-prod.sh. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
10 lines
269 B
Bash
Executable file
10 lines
269 B
Bash
Executable file
#!/bin/bash
|
|
# Quick "is the app alive?" check. Prints status and exits 0 (healthy) or 1 (not).
|
|
HEALTH_URL=http://127.0.0.1:7183/health
|
|
|
|
if output=$(curl -sf "$HEALTH_URL" 2>&1); then
|
|
echo "OK $output"
|
|
exit 0
|
|
fi
|
|
echo "DOWN no response from $HEALTH_URL"
|
|
exit 1
|