Щербацевич-БПИ2302-на 3

This commit is contained in:
2026-11-27 21:28:16 +03:00
parent 20afc2c790
commit bd3a530df3
119 changed files with 10026 additions and 18 deletions
+14
View File
@@ -0,0 +1,14 @@
#!/bin/sh
set -eu
cd "$(dirname "$0")/.."
: "${TARGET_INSTANCE_ID:?missing TARGET_INSTANCE_ID}"
ids=$(docker compose --env-file .env ps -q api)
for id in $ids; do
host=$(docker inspect -f '{{.Config.Hostname}}' "$id")
if [ "$host" = "$TARGET_INSTANCE_ID" ]; then
docker stop -t 2 "$id" >/dev/null
exit 0
fi
done
echo "api instance was not found" >&2
exit 1