Implement shared idempotency, health-aware balancing and replica lifecycle checks

This commit is contained in:
2026-11-06 17:58:43 +03:00
parent 0ab3a341aa
commit 029bf9b377
35 changed files with 2470 additions and 20 deletions
+14
View File
@@ -0,0 +1,14 @@
#!/bin/sh
# Sequential replacement; never stop the surviving healthy replica.
set -eu
cd "$(dirname "$0")/.."
: "${API_IMAGE:?Set API_IMAGE to the already built target image}"
export API_IMAGE
ids=$(docker compose ps -q api)
for id in $ids; do
python3 scripts/wait_replicas.py 2
docker stop --time 8 "$id" >/dev/null
docker rm "$id" >/dev/null
docker compose up -d --no-deps --no-recreate --scale api=2 --wait api
python3 scripts/wait_replicas.py 2
done