Реализована лабораторная 4: MinIO и вложения

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-12-02 03:04:36 +03:00
co-authored by Copilot
parent ec540a1a72
commit dd484c90b4
28 changed files with 1718 additions and 34 deletions
+17
View File
@@ -0,0 +1,17 @@
#!/bin/sh
set -eu
: "${TARGET_INSTANCE_ID:?test provides the API instance ID}"
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
PROJECT_DIR=$(dirname "$SCRIPT_DIR")
for container_id in $(docker compose --project-directory "$PROJECT_DIR" --env-file "$PROJECT_DIR/.env" ps -q api); do
hostname=$(docker inspect --format '{{.Config.Hostname}}' "$container_id")
if [ "$hostname" = "$TARGET_INSTANCE_ID" ]; then
docker stop "$container_id" >/dev/null
exit 0
fi
done
printf '%s\n' 'No running API container matches TARGET_INSTANCE_ID' >&2
exit 1