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

This commit is contained in:
kaktuz20000
2026-11-04 19:22:35 +03:00
parent 20afc2c790
commit 5a6fcff3ef
90 changed files with 8848 additions and 130 deletions
+20
View File
@@ -0,0 +1,20 @@
#!/bin/sh
set -eu
: "${TARGET_INSTANCE_ID:?test provides target API instance alias}"
matches=0
target_container=
for container in $(docker compose --env-file .env ps -q api); do
hostname=$(docker inspect --format '{{.Config.Hostname}}' "$container")
if [ "$hostname" = "$TARGET_INSTANCE_ID" ]; then
matches=$((matches + 1))
target_container=$container
fi
done
if [ "$matches" -ne 1 ]; then
printf '%s\n' 'Could not resolve TARGET_INSTANCE_ID to exactly one API container.' >&2
exit 1
fi
docker stop --time 2 "$target_container" >/dev/null