From e7683ee9a5dea51ffee0b04b714caff068c86dd2 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Tue, 9 Jan 2024 12:49:03 +0100 Subject: [PATCH] fix: service labels without ports (unknown ports) --- bootstrap/helpers/docker.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap/helpers/docker.php b/bootstrap/helpers/docker.php index 59f45358e..0376fcc6e 100644 --- a/bootstrap/helpers/docker.php +++ b/bootstrap/helpers/docker.php @@ -249,9 +249,9 @@ function fqdnLabelsForTraefik(string $uuid, Collection $domains, bool $is_force_ // Set labels for http (redirect to https) $labels->push("traefik.http.routers.{$http_label}.rule=Host(`{$host}`) && PathPrefix(`{$path}`)"); $labels->push("traefik.http.routers.{$http_label}.entryPoints=http"); - $labels->push("traefik.http.routers.{$http_label}.service={$http_label}"); if ($port) { $labels->push("traefik.http.services.{$http_label}.loadbalancer.server.port=$port"); + $labels->push("traefik.http.routers.{$http_label}.service={$http_label}"); } if ($is_force_https_enabled) { $labels->push("traefik.http.routers.{$http_label}.middlewares=redirect-to-https"); @@ -261,9 +261,9 @@ function fqdnLabelsForTraefik(string $uuid, Collection $domains, bool $is_force_ $labels->push("traefik.http.routers.{$http_label}.rule=Host(`{$host}`) && PathPrefix(`{$path}`)"); $labels->push("traefik.http.routers.{$http_label}.entryPoints=http"); $labels->push("traefik.http.routers.{$http_label}.middlewares=gzip"); - $labels->push("traefik.http.routers.{$http_label}.service={$http_label}"); if ($port) { $labels->push("traefik.http.services.{$http_label}.loadbalancer.server.port=$port"); + $labels->push("traefik.http.routers.{$http_label}.service={$http_label}"); } if ($path !== '/') { $labels->push("traefik.http.routers.{$http_label}.middlewares={$http_label}-stripprefix");