From 958a7a823ec0556b132f0d7d1a06ccb00fb05528 Mon Sep 17 00:00:00 2001 From: Pius Rubangakene Date: Tue, 15 Oct 2024 19:03:17 +0300 Subject: [PATCH] Update stop-demo.sh to use PROJECT_NAME container names --- scripts/stop-demo.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/stop-demo.sh b/scripts/stop-demo.sh index 9507b8a..a146db0 100755 --- a/scripts/stop-demo.sh +++ b/scripts/stop-demo.sh @@ -11,15 +11,18 @@ setupDirs # Export more environment variables exportPaths +# Read PROJECT_NAME from the temporary file +PROJECT_NAME=$(cat /tmp/project_name.txt) + INSTALLED_DOCKER_VERSION=$(docker version -f "{{.Server.Version}}") MINIMUM_REQUIRED_DOCKER_VERSION_REGEX="^((([2-9][1-9]|[3-9][0]|[0-9]{3,}).*)|(20\.([0-9]{3,}|[1-9][1-9]|[2-9][0]).*)|(20\.10\.([0-9]{3,}|[2-9][0-9]|[1][3-9])))" if [[ $INSTALLED_DOCKER_VERSION =~ $MINIMUM_REQUIRED_DOCKER_VERSION_REGEX ]]; then echo "$INFO Stopping demo service..." - docker compose -p ozone $dockerComposeDemoCLIOptions stop + docker compose -p $PROJECT_NAME $dockerComposeDemoCLIOptions stop echo "$INFO Stopping proxy service..." - docker compose -p ozone $dockerComposeProxyCLIOptions stop + docker compose -p $PROJECT_NAME $dockerComposeProxyCLIOptions stop echo "$INFO Stopping Ozone services..." - docker compose -p ozone $dockerComposeOzoneCLIOptions stop + docker compose -p $PROJECT_NAME $dockerComposeOzoneCLIOptions stop else echo "$ERROR Docker versions < 20.10.13 are not supported" fi