[+] add project

This commit is contained in:
2026-11-15 22:00:21 +03:00
parent 0ab3a341aa
commit 369c5c1660
45 changed files with 2442 additions and 57 deletions
+17
View File
@@ -0,0 +1,17 @@
#!/bin/sh
set -eu
ROOT=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
cd "$ROOT"
: "${TARGET_INSTANCE_ID:?TARGET_INSTANCE_ID is required}"
for container in $(docker compose ps -q api); do
hostname=$(docker inspect --format '{{.Config.Hostname}}' "$container")
if [ "$hostname" = "$TARGET_INSTANCE_ID" ]; then
docker stop --time 2 "$container" >/dev/null
exit 0
fi
done
printf '%s\n' 'No running API replica matches TARGET_INSTANCE_ID' >&2
exit 1