This commit is contained in:
4
scripts/backup.sh
Executable file
4
scripts/backup.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
exec "$(dirname "$0")/backup_db.sh" "$@"
|
||||
@@ -44,6 +44,7 @@ for attempt in {1..30}; do
|
||||
if curl -fsS "$HEALTH_URL" >/tmp/carpass-ready.json; then
|
||||
cat /tmp/carpass-ready.json
|
||||
echo
|
||||
BASE_URL="${BASE_URL:-${HEALTH_URL%/ready}}" ./scripts/smoke_test.sh
|
||||
$COMPOSE ps
|
||||
exit 0
|
||||
fi
|
||||
|
||||
4
scripts/restore.sh
Executable file
4
scripts/restore.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
exec "$(dirname "$0")/restore_db.sh" "$@"
|
||||
16
scripts/smoke_test.sh
Executable file
16
scripts/smoke_test.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
BASE_URL="${BASE_URL:-http://127.0.0.1:8000}"
|
||||
|
||||
echo "Checking health..."
|
||||
curl -fsS "$BASE_URL/health"
|
||||
echo
|
||||
|
||||
echo "Checking readiness..."
|
||||
curl -fsS "$BASE_URL/ready"
|
||||
echo
|
||||
|
||||
echo "Checking metrics..."
|
||||
curl -fsS "$BASE_URL/metrics" | grep -q "carpass_requests_total"
|
||||
echo "Smoke test passed."
|
||||
Reference in New Issue
Block a user