lab5_files

This commit is contained in:
caramelteawithmint
2026-11-27 06:14:22 +03:00
parent 470d9d6f1e
commit 6b60dd5d74
31 changed files with 1750 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
#!/bin/sh
set -eu
: "${TARGET_INSTANCE_ID:?test provides target API instance alias}"
if [ "$TARGET_INSTANCE_ID" != "api-1" ] && [ "$TARGET_INSTANCE_ID" != "api-2" ]; then
echo "Unknown instance: $TARGET_INSTANCE_ID" >&2
exit 1
fi
SERVICE_NAME="$TARGET_INSTANCE_ID"
if [ "$SERVICE_NAME" = "api-1" ]; then SERVICE_NAME="api1"; fi
if [ "$SERVICE_NAME" = "api-2" ]; then SERVICE_NAME="api2"; fi
echo "Stopping container for $SERVICE_NAME..."
docker compose stop "$SERVICE_NAME"