forked from mtusi2026/mtusi2026lab3
feat: добавить API, compose, nginx и отчёт для лабораторной 3
Co-authored-by: aider (deepseek/deepseek-chat) <aider@aider.chat>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
# Stop exactly one API replica identified by TARGET_INSTANCE_ID (api-1 or api-2).
|
||||
# Leaves it stopped; does not touch DB/LB/volumes.
|
||||
: "${TARGET_INSTANCE_ID:?test provides target API instance alias}"
|
||||
cd "$(dirname "$0")/.."
|
||||
case "$TARGET_INSTANCE_ID" in
|
||||
api-1|api-2) ;;
|
||||
*) echo "unknown TARGET_INSTANCE_ID: $TARGET_INSTANCE_ID" >&2; exit 2 ;;
|
||||
esac
|
||||
docker compose --env-file .env stop "$TARGET_INSTANCE_ID"
|
||||
exit 0
|
||||
Reference in New Issue
Block a user