Основа из lab3

This commit is contained in:
Evgeny Bushkov
2026-11-06 14:56:03 +03:00
parent ec540a1a72
commit 7542225498
41 changed files with 2456 additions and 11 deletions
+12
View File
@@ -0,0 +1,12 @@
#!/bin/sh
set -eu
# Stop exactly one API replica identified by TARGET_INSTANCE_ID (api-1 or api-2).
# Leaves it stopped; does not touch DB/LB/volumes.
: "${TARGET_INSTANCE_ID:?test provides target API instance alias}"
cd "$(dirname "$0")/.."
case "$TARGET_INSTANCE_ID" in
api-1|api-2) ;;
*) echo "unknown TARGET_INSTANCE_ID: $TARGET_INSTANCE_ID" >&2; exit 2 ;;
esac
docker compose --env-file .env stop "$TARGET_INSTANCE_ID"
exit 0