Лабораторная 3: реализован стенд с балансировщиком и идемпотентностью

This commit is contained in:
2026-11-22 16:11:18 +03:00
parent 0ab3a341aa
commit 752995515f
31 changed files with 1576 additions and 23 deletions
+12
View File
@@ -0,0 +1,12 @@
#!/bin/sh
# Stop exactly ONE API replica selected by TARGET_INSTANCE_ID and leave it stopped.
# Used by tests/resilience.py failover scenario.
set -eu
: "${TARGET_INSTANCE_ID:?test provides target API instance alias}"
# Resolve compose project directory regardless of invocation cwd.
cd "$(dirname "$0")/.."
# INSTANCE_ID values are the compose service names (api-1, api-2, ...).
exec docker compose stop --timeout 5 "$TARGET_INSTANCE_ID"