ЛР 4 — вложения S3 и reconciler

This commit is contained in:
2026-11-15 01:40:45 +03:00
parent ec540a1a72
commit 007da711ba
30 changed files with 1250 additions and 80 deletions
+14
View File
@@ -0,0 +1,14 @@
#!/bin/sh
set -eu
: "${TARGET_INSTANCE_ID:?TARGET_INSTANCE_ID is required}"
# X-Instance-Id is the container hostname (the Docker short ID). Resolve it to
# exactly one scaled Compose container and stop only that process.
for id in $(docker compose --env-file .env ps -q api); do
hostname=$(docker inspect --format '{{.Config.Hostname}}' "$id")
if [ "$hostname" = "$TARGET_INSTANCE_ID" ]; then
docker stop --time 3 "$id" >/dev/null
exit 0
fi
done
echo "No running api container matches TARGET_INSTANCE_ID" >&2
exit 1