Implement shared idempotency, health-aware balancing and replica lifecycle checks
This commit is contained in:
Executable
+14
@@ -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
|
||||
Reference in New Issue
Block a user