forked from mtusi2026/mtusi2026lab3
Лабораторная 3: реализован стенд с балансировщиком и идемпотентностью
This commit is contained in:
@@ -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"
|
||||
Reference in New Issue
Block a user