From c0c66e7d8853dc99b4c3553f820ebf2ce37eb2ea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Aug 2024 14:03:59 +0000 Subject: [PATCH 1/2] chore(deps): bump traefik in /plugins/traefik-vhosts Bumps traefik from 2.11.2 to 3.1.2. --- updated-dependencies: - dependency-name: traefik dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- plugins/traefik-vhosts/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/traefik-vhosts/Dockerfile b/plugins/traefik-vhosts/Dockerfile index 3111b854b..4567a7b11 100644 --- a/plugins/traefik-vhosts/Dockerfile +++ b/plugins/traefik-vhosts/Dockerfile @@ -1 +1 @@ -FROM traefik:2.11.2 +FROM traefik:3.1.2 From 02cfe5d65369f5810deaa41dc6f3e5b1fcd04e8b Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 22 Sep 2024 01:37:39 -0400 Subject: [PATCH 2/2] fix: set multiple hosts via logical operators to conform to new v3 syntax --- .../traefik-vhosts/docker-args-process-deploy | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/plugins/traefik-vhosts/docker-args-process-deploy b/plugins/traefik-vhosts/docker-args-process-deploy index e45b5b18e..1d69e46bc 100755 --- a/plugins/traefik-vhosts/docker-args-process-deploy +++ b/plugins/traefik-vhosts/docker-args-process-deploy @@ -83,8 +83,18 @@ trigger-traefik-vhosts-docker-args-process-deploy() { if [[ -n "$is_app_listening" ]]; then app_domains="$(plugn trigger domains-list "$APP")" if [[ -n "$app_domains" ]]; then - traefik_domains="$(echo "$app_domains" | xargs)" - traefik_domains="${traefik_domains// /\\\`,\\\`}" + # get length of domains + if [[ "$(echo "$traefik_domains" | wc -w)" -eq 1 ]]; then + traefik_domains="Host(\\\`$traefik_domains\\\`)" + else + for domain in $(echo "$app_domains" | xargs); do + if [[ -z "$traefik_domains" ]]; then + traefik_domains="Host(\\\`$domain\\\`)" + continue + fi + traefik_domains="$traefik_domains || Host(\\\`$domain\\\`)" + done + fi fi output="--label traefik.enable=true" @@ -99,7 +109,7 @@ trigger-traefik-vhosts-docker-args-process-deploy() { output="$output --label traefik.http.routers.$APP-$PROC_TYPE-http.entrypoints=$(fn-traefik-http-entry-point)" output="$output --label traefik.http.routers.$APP-$PROC_TYPE-http.service=$APP-$PROC_TYPE-http" if [[ -n "$traefik_domains" ]]; then - output="$output --label \"traefik.http.routers.$APP-$PROC_TYPE-http.rule=Host(\\\`$traefik_domains\\\`)\"" + output="$output --label \"traefik.http.routers.$APP-$PROC_TYPE-http.rule=$traefik_domains\"" fi fi