Lab 3: solution for grade 3 - BPI2304 Vardanyan

This commit is contained in:
garik
2026-11-16 22:10:49 +03:00
parent 0ab3a341aa
commit 0b6edebfc0
17 changed files with 937 additions and 169 deletions
+5
View File
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# ACTION_SCRIPT for make test-persistence. Does not delete volumes.
set -euo pipefail
cd "$(dirname "$0")/.."
docker compose --env-file .env restart db api1 api2 lb >/dev/null
+8
View File
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
# ACTION_SCRIPT for make test-failover: stop EXACTLY the replica named by test.
set -euo pipefail
cd "$(dirname "$0")/.."
case "${TARGET_INSTANCE_ID:-}" in
api1|api2) docker compose --env-file .env stop -t 1 "$TARGET_INSTANCE_ID" >/dev/null ;;
*) echo "Unexpected TARGET_INSTANCE_ID; expected api1 or api2" >&2; exit 2 ;;
esac