Support naming conventions for compose v2 and swarm

- Naming convention in Docker Swarm: Fixes #14
- Compose v2 uses `-` separator instead of `_`: Fixes #10
This commit is contained in:
Robert Dailey 2022-03-19 14:00:38 -05:00
parent f2ce54653b
commit 52579827be

View file

@ -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}"