From 4d41cbd3ab1b071fc18b8e3358b3ef663b13d68a Mon Sep 17 00:00:00 2001 From: Alexey Kharchenko Date: Mon, 17 Jul 2023 11:42:53 +0530 Subject: [PATCH] Hide empty labels section --- plugins/traefik-vhosts/templates/compose.yml.sigil | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/traefik-vhosts/templates/compose.yml.sigil b/plugins/traefik-vhosts/templates/compose.yml.sigil index c49f233b0..7102f374e 100644 --- a/plugins/traefik-vhosts/templates/compose.yml.sigil +++ b/plugins/traefik-vhosts/templates/compose.yml.sigil @@ -25,7 +25,12 @@ services: - --certificatesresolvers.leresolver.acme.tlschallenge=true {{ end }} + {{ if or (eq $.TRAEFIK_API_ENABLED "true") ($.TRAEFIK_BASIC_AUTH) ($.TRAEFIK_LETSENCRYPT_EMAIL) }} labels: + {{ else }} + labels: [] + {{ end }} + {{ if eq $.TRAEFIK_API_ENABLED "true" }} # Dashboard - "traefik.http.routers.api.rule=Host(`{{ $.TRAEFIK_API_VHOST }}`)"