From 49cb50ed6e8ab4880b1f5e1f40ca91aa156dc088 Mon Sep 17 00:00:00 2001 From: Mythie Date: Sun, 9 Apr 2023 22:33:14 +1000 Subject: [PATCH] feat: add down flag for stopping environment --- scripts/dx.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/dx.sh b/scripts/dx.sh index ac71645fe..94dcfbdf6 100755 --- a/scripts/dx.sh +++ b/scripts/dx.sh @@ -28,6 +28,12 @@ pushd "$MONOREPO_ROOT" >/dev/null # On failure popd back to the original directory trap "popd >/dev/null" EXIT +# If we have received the -down or -d flag, stop the containers +if [ "$1" = "-down" ] || [ "$1" = "-d" ]; then + docker-compose -f "$MONOREPO_ROOT/docker/compose-without-app.yml" down + exit 0 +fi + docker-compose -f "$MONOREPO_ROOT/docker/compose-without-app.yml" up -d # Install dependencies