This commit is contained in:
2026-11-06 18:05:29 +03:00
parent ec540a1a72
commit ba7bef17e1
97 changed files with 7579 additions and 23 deletions
+20
View File
@@ -0,0 +1,20 @@
#!/bin/sh
# Start-first rolling update of the API service under load.
#
# Swarm replaces one task at a time (parallelism 1), waiting for the new task's
# health check before removing the old one. Traefik keeps routing to ready tasks.
set -eu
root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
cd "$root"
stack=${STACK_NAME:-lab4}
image=${API_IMAGE:-mtusi-messenger-lab4:4.0.1}
docker build --build-arg APP_REVISION="$image" -t "$image" .
docker service update \
--image "$image" \
--update-order start-first \
--update-parallelism 1 \
--update-delay 5s \
--update-failure-action rollback \
"${stack}_api"
docker service ps "${stack}_api" --no-trunc