dev-env/down
2025-05-25 22:21:05 +02:00

28 lines
771 B
Bash
Executable File

#!/bin/bash
ENV_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
source $ENV_DIR/bin/messages
warnmsg "This script will down docker containers (= stop & remove)"
warnmsg "This also deletes all data on the databases"
warnmsg "Do you want to continue? (y/n)"
read -p "Answer: " ANSWER
echo ""
if [[ "$ANSWER" == "y" || "$ANSWER" == "Y" ]]; then
$ENV_DIR/script/foreachSystem/dcom down
infomsg "[dev-env]: Executing docker-compose down for dev-env"
docker compose -f "$ENV_DIR/docker/docker-compose.yml" down
echo ""
if [ -f "$ENV_DIR/.firstRun" ]; then
infomsg "[dev-env]: Removing firstRun marker"
rm "$ENV_DIR/.firstRun"
echo ""
fi
docker ps
else
infomsg "[dev-env]: down cancelled"
fi