This commit is contained in:
2026-10-23 16:38:27 +03:00
parent 0ab3a341aa
commit a7f3ab11a7
66 changed files with 5004 additions and 16 deletions
+24
View File
@@ -0,0 +1,24 @@
#!/bin/sh
set -eu
: "${TARGET_INSTANCE_ID:?TARGET_INSTANCE_ID is required}"
cd "$(dirname "$0")/.."
found=""
ids=$(docker compose --env-file .env ps -q api)
for id in $ids; do
host=$(docker inspect -f '{{.Config.Hostname}}' "$id")
if [ "$host" = "$TARGET_INSTANCE_ID" ]; then
found=$id
break
fi
done
if [ -z "$found" ]; then
echo "api replica not found" >&2
exit 1
fi
docker stop -t 8 "$found" >/dev/null
exit 0