forked from mtusi2026/mtusi2026lab3
New Commit
This commit is contained in:
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
# Останавливает именно ту API-реплику, чей X-Instance-Id передан тестом.
|
||||
set -euo pipefail
|
||||
: "${TARGET_INSTANCE_ID:?TARGET_INSTANCE_ID is required}"
|
||||
|
||||
cid=$(docker ps -q --filter "id=${TARGET_INSTANCE_ID}" \
|
||||
--filter "label=com.docker.compose.service=app")
|
||||
[ -n "$cid" ] || { echo "replica not found" >&2; exit 1; }
|
||||
|
||||
docker stop -t 5 "$cid" >/dev/null
|
||||
Reference in New Issue
Block a user