ЛР 3: балансировка, идемпотентность и failover — на 3

This commit is contained in:
2026-11-20 16:20:41 +03:00
parent 0ab3a341aa
commit be96c39563
31 changed files with 1490 additions and 21 deletions
+11
View File
@@ -0,0 +1,11 @@
#!/bin/sh
set -eu
case "${TARGET_INSTANCE_ID:-}" in
api1|api2) ;;
*) echo 'TARGET_INSTANCE_ID must be api1 or api2' >&2; exit 2 ;;
esac
cd "$(dirname "$0")/.."
if [ -n "${LAB3_PROJECT:-}" ]; then
set -- --project-name "$LAB3_PROJECT"
fi
docker compose "$@" stop --timeout 4 "$TARGET_INSTANCE_ID"