Основа из lab3

This commit is contained in:
Evgeny Bushkov
2026-11-06 14:56:03 +03:00
parent ec540a1a72
commit 7542225498
41 changed files with 2456 additions and 11 deletions
+18
View File
@@ -0,0 +1,18 @@
#!/bin/sh
set -eu
# Restart API replicas and PostgreSQL preserving volumes and data.
# Does NOT remove volumes, does NOT re-seed, does NOT print credentials.
cd "$(dirname "$0")/.."
docker compose --env-file .env restart postgres
docker compose --env-file .env restart api-1 api-2
# Wait for readiness through the LB.
i=0
while [ $i -lt 60 ]; do
if curl -fsS http://localhost:8080/health/ready >/dev/null 2>&1; then
exit 0
fi
i=$((i+1))
sleep 1
done
echo "readiness timeout" >&2
exit 1