forked from mtusi2026/mtusi2026lab2
Переносит минимум lab1 на PostgreSQL, добавляет Argon2id, Basic-вход, opaque Bearer-сессии в Valkey с TTL и AOF, строгую валидацию JSON, keyset-пагинацию по индексу, миграции, compose-стенд и собственные проверки уровня 3/4. Трек 5 — план запроса и восстановление.
16 lines
385 B
Bash
Executable File
16 lines
385 B
Bash
Executable File
#!/bin/sh
|
|
# Wait until /health/ready answers 200. Usage: scripts/wait-ready.sh [url]
|
|
set -eu
|
|
url=${1:-http://127.0.0.1:8080/health/ready}
|
|
attempts=0
|
|
while [ "$attempts" -lt 90 ]; do
|
|
if curl -fsS -o /dev/null "$url" 2>/dev/null; then
|
|
echo "ready: $url"
|
|
exit 0
|
|
fi
|
|
attempts=$((attempts + 1))
|
|
sleep 1
|
|
done
|
|
echo "not ready after 90 seconds: $url" >&2
|
|
exit 1
|