Files
mtusi2026lab3/scripts/stop-one.sh
T
2026-10-30 16:39:32 +03:00

9 lines
235 B
Bash

#!/bin/sh
set -eu
cd "$(dirname "$0")/.."
case "${TARGET_INSTANCE_ID:-api1}" in
api1|api2) target="${TARGET_INSTANCE_ID:-api1}" ;;
*) echo "Unknown API replica" >&2; exit 2 ;;
esac
docker compose --env-file .env stop "$target"