forked from mtusi2026/mtusi2026lab4
14 lines
329 B
Bash
14 lines
329 B
Bash
#!/bin/sh
|
|
# Stop exactly one API replica and leave it stopped. Do not touch volumes or stores.
|
|
set -eu
|
|
cd "$(dirname "$0")/.."
|
|
: "${TARGET_INSTANCE_ID:?}"
|
|
case "$TARGET_INSTANCE_ID" in
|
|
api-1|api-2) ;;
|
|
*)
|
|
echo "unexpected instance" >&2
|
|
exit 2
|
|
;;
|
|
esac
|
|
docker compose --env-file .env stop -t 2 "$TARGET_INSTANCE_ID"
|