forked from mtusi2026/mtusi2026lab4
lab4 - оценка 4
This commit is contained in:
Executable
+26
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
echo "Restarting stateful services and API without removing volumes ..."
|
||||
docker compose --env-file .env restart postgres redis s3 api lb
|
||||
|
||||
echo "waiting for readiness ..."
|
||||
|
||||
i=0
|
||||
while true; do
|
||||
i=$((i + 1))
|
||||
|
||||
if curl -fsS http://localhost:8080/health/ready >/dev/null 2>&1; then
|
||||
echo "ready"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$i" -ge 90 ]; then
|
||||
echo "API did not become ready in time" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sleep 1
|
||||
done
|
||||
Reference in New Issue
Block a user