helper scripts
This commit is contained in:
31
ctrl/stop.sh
Executable file
31
ctrl/stop.sh
Executable 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
|
||||
Reference in New Issue
Block a user