ЛР4: MinIO, вложения и reconciler на оценку 5

This commit is contained in:
R0flyan
2026-10-30 20:52:21 +03:00
parent ec540a1a72
commit a0de6968e3
85 changed files with 6425 additions and 48 deletions
+16
View File
@@ -0,0 +1,16 @@
#!/bin/sh
set -eu
cd "$(dirname "$0")/.."
: "${TARGET_INSTANCE_ID:?TARGET_INSTANCE_ID is required}"
for id in $(docker compose ps -q api); do
hostname=$(docker inspect --format '{{.Config.Hostname}}' "$id")
if [ "$hostname" = "$TARGET_INSTANCE_ID" ]; then
mkdir -p evidence
docker inspect --format '{{.Id}} {{.State.Status}} {{.State.StartedAt}}' "$id" > evidence/stopped-before.txt
docker stop --time 9 "$id" > /dev/null
docker inspect --format '{{.Id}} {{.State.Status}} {{.State.FinishedAt}} {{.State.ExitCode}}' "$id" > evidence/stopped-after.txt
exit 0
fi
done
echo 'Target is not a running API container' >&2
exit 1