lab3: LB + 2 API replicas, idempotency, X-Instance-Id, failover/persistence tests (grade 4)

This commit is contained in:
2026-10-09 15:50:44 +03:00
parent 0ab3a341aa
commit eacab162c9
29 changed files with 2490 additions and 18 deletions
+18
View File
@@ -0,0 +1,18 @@
#!/bin/sh
set -eu
cd "$(dirname "$0")/.."
docker compose --env-file .env restart postgres cache api
i=0
while [ $i -lt 60 ]; do
if curl -sf http://localhost:8080/health/ready > /dev/null 2>&1; then
exit 0
fi
sleep 1
i=$((i + 1))
done
echo "stack did not become healthy in 60 seconds" >&2
exit 1