Files
2026-08-30 11:30:09 +02:00

24 lines
538 B
Bash

#!/usr/bin/env bash
# Stops the mqtt-ingester stack.
#
# Stops and removes containers and the default network. Volumes
# (timescale-data, mqtt-logs, loki-data) are preserved; use prune.sh to
# remove them.
#
# Usage:
# ./scripts/stop.sh [profiles...]
set -euo pipefail
StackRoot="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$StackRoot"
Profiles="${*:-}"
ComposeArgs=(compose down --remove-orphans)
if [ -n "$Profiles" ]; then
ComposeArgs+=(--profile "$Profiles")
fi
echo "Stopping stack..."
docker "${ComposeArgs[@]}"