Files
mtusi2026lab4/scripts/stop-one.sh

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"