forked from mtusi2026/mtusi2026lab2
Лабораторная 2 на 5 готово
This commit is contained in:
Executable
+20
@@ -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
|
||||
Reference in New Issue
Block a user