forked from mtusi2026/mtusi2026lab4
Реализовать ЛР 4 на 3: приватное S3 и вложения — Гавриленко БПИ2303
This commit is contained in:
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
cd "$(dirname "$0")/.."
|
||||
: "${TARGET_INSTANCE_ID:?Set TARGET_INSTANCE_ID from the API response}"
|
||||
for id in $(docker compose ps -q api); do
|
||||
hostname=$(docker inspect --format '{{.Config.Hostname}}' "$id")
|
||||
if [ "$hostname" = "$TARGET_INSTANCE_ID" ]; then
|
||||
docker stop --time 5 "$id"
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
echo 'Target is not a running API replica in this Compose project' >&2
|
||||
exit 1
|
||||
Reference in New Issue
Block a user