Files
mtusi2026lab5/scripts/stop-worker.sh
T
2026-11-20 20:11:39 +03:00

7 lines
202 B
Bash

#!/bin/sh
# Scale the worker to zero; accepted jobs stay durable in the outbox/queue.
set -eu
stack=${STACK_NAME:-lab5}
docker service scale "${stack}_worker=0" >/dev/null
printf 'worker scaled to 0\n'