helper scripts

This commit is contained in:
2026-02-03 14:18:03 -03:00
parent 3db8c0c453
commit ffbbf87873
4 changed files with 69 additions and 9 deletions

31
ctrl/stop.sh Executable file
View File

@@ -0,0 +1,31 @@
#!/bin/bash
# Stop MPR stack
# Usage: ./stop.sh [OPTIONS]
#
# Options:
# -v, --volumes Also remove volumes (database data)
#
# Examples:
# ./stop.sh # Stop containers
# ./stop.sh -v # Stop and remove volumes
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR"
VOLUMES=""
while [[ $# -gt 0 ]]; do
case $1 in
-v|--volumes)
VOLUMES="-v"
shift
;;
*)
shift
;;
esac
done
docker compose down $VOLUMES