Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OZ-627: Update stop-demo.sh to use exported project name #114

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions scripts/stop-demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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