выполение на 5

This commit is contained in:
kaktuz20000
2026-11-04 12:18:07 +03:00
parent 470d9d6f1e
commit 6196d4ee8e
60 changed files with 6317 additions and 69 deletions
+19
View File
@@ -0,0 +1,19 @@
#!/bin/sh
set -eu
cd "$(dirname "$0")/.."
: "${TARGET_INSTANCE_ID:?test provides target API instance alias}"
found=
for container_id in $(docker compose ps --quiet --status running api); do
hostname=$(docker inspect --format '{{.Config.Hostname}}' "$container_id")
if [ "$hostname" = "$TARGET_INSTANCE_ID" ]; then
found=$container_id
break
fi
done
if [ -z "$found" ]; then
printf '%s\n' 'No running API container matched the requested instance alias.' >&2
exit 1
fi
docker stop --time 5 "$found" >/dev/null