lab3: 2 API replicas behind nginx LB, idempotency, X-Instance-Id

This commit is contained in:
2026-11-16 21:54:29 +03:00
parent 0ab3a341aa
commit fbe686f521
23 changed files with 727 additions and 14 deletions
+12
View File
@@ -0,0 +1,12 @@
#!/bin/sh
set -eu
docker compose --env-file .env restart postgres api-1 api-2 lb
i=0
while [ "$i" -lt 90 ]; do
if curl -fsS http://localhost:8080/health/ready >/dev/null 2>&1; then
exit 0
fi
i=$((i + 1))
sleep 1
done
exit 1