lab3 gusak

This commit is contained in:
2026-11-12 21:23:41 +03:00
parent 0ab3a341aa
commit 353ec4441d
36 changed files with 1706 additions and 32 deletions
+14
View File
@@ -0,0 +1,14 @@
#!/bin/sh
set -eu
: "${TARGET_INSTANCE_ID:?TARGET_INSTANCE_ID is required}"
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
docker stop "$container" >/dev/null
exit 0
fi
done
exit 2