feat:level4

This commit is contained in:
Оля Мороз
2026-10-20 18:35:44 +03:00
parent 4349a539d9
commit ae53d39ccc
20 changed files with 775 additions and 26 deletions
+15
View File
@@ -0,0 +1,15 @@
#!/bin/sh
set -eu
# TARGET_INSTANCE_ID приходит от теста: alias обслужившей реплики.
# В compose alias = INSTANCE_ID = "api-1" / "api-2".
: "${TARGET_INSTANCE_ID:?test provides target API instance alias}"
case "$TARGET_INSTANCE_ID" in
api-1) SERVICE=api1 ;;
api-2) SERVICE=api2 ;;
*) echo "unknown instance: $TARGET_INSTANCE_ID" >&2; exit 2 ;;
esac
# Останавливаем ТОЛЬКО эту реплику, оставляем остановленной.
docker compose stop "$SERVICE"
echo "stopped $SERVICE ($TARGET_INSTANCE_ID)"