Добавление реплик и балансировщик миграции отдельно

This commit is contained in:
Dmitry
2026-10-26 20:58:48 +03:00
parent 0ab3a341aa
commit 189f880651
66 changed files with 2851 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
#!/bin/sh
set -eu
ROOT="$(CDPATH= cd -- "$(dirname "$0")/.." && pwd)"
cd "$ROOT/Lido"
docker compose -f docker-compose.yml restart db api redis
BASE_URL="${BASE_URL:-http://127.0.0.1:8080}"
i=0
while [ "$i" -lt 60 ]; do
if curl -sf "$BASE_URL/health/live" >/dev/null 2>&1 \
|| curl -sf "$BASE_URL/actuator/health" >/dev/null 2>&1; then
exit 0
fi
i=$((i + 1))
sleep 1
done
echo "API not ready" >&2
exit 1