From 52579827beb8453454ed4ef7443894afb4be236d Mon Sep 17 00:00:00 2001 From: Robert Dailey Date: Sat, 19 Mar 2022 14:00:38 -0500 Subject: [PATCH] Support naming conventions for compose v2 and swarm - Naming convention in Docker Swarm: Fixes #14 - Compose v2 uses `-` separator instead of `_`: Fixes #10 --- scripts/find-container.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/find-container.sh b/scripts/find-container.sh index ecce0f9..2582ba0 100755 --- a/scripts/find-container.sh +++ b/scripts/find-container.sh @@ -2,9 +2,9 @@ set -e if [[ ! -z "$NEXTCLOUD_PROJECT_NAME" ]]; then - containerName="${NEXTCLOUD_PROJECT_NAME}_" + containerName="${NEXTCLOUD_PROJECT_NAME}[_-]" else - matchEnd="," + matchEnd="(,|\.\d+)" fi containerName="${containerName}${NEXTCLOUD_CONTAINER_NAME}"