#!/bin/sh set -eu cd "$(dirname "$0")/.." case "${TARGET_INSTANCE_ID:?}" in api1|api2) # Stop TLS sidecar first: it shares the API network namespace. docker compose stop "${TARGET_INSTANCE_ID}-tls" "$TARGET_INSTANCE_ID" ;; *) echo 'Unsafe or unknown instance alias' >&2; exit 2;; esac