From b94f6cd9d0297205af4523f26dc52e776184754b Mon Sep 17 00:00:00 2001 From: Bastian Hoyer Date: Sun, 3 Mar 2024 08:17:33 +0100 Subject: [PATCH] set exposedByDefault to false in traefik to only expose docker containers that are enabled by label --- plugins/traefik-vhosts/templates/compose.yml.sigil | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/traefik-vhosts/templates/compose.yml.sigil b/plugins/traefik-vhosts/templates/compose.yml.sigil index 6bddb9938..d06854484 100644 --- a/plugins/traefik-vhosts/templates/compose.yml.sigil +++ b/plugins/traefik-vhosts/templates/compose.yml.sigil @@ -12,6 +12,7 @@ services: - --entrypoints.https.address=:443 {{ end }} - --providers.docker + - --providers.docker.exposedByDefault=false - --api={{ $.TRAEFIK_API_ENABLED }} - --api.dashboard={{ $.TRAEFIK_DASHBOARD_ENABLED }} @@ -33,6 +34,7 @@ services: {{ if eq $.TRAEFIK_API_ENABLED "true" }} # Dashboard + - "traefik.enable=true" - "traefik.http.routers.api.rule=Host(`{{ $.TRAEFIK_API_VHOST }}`)" - "traefik.http.routers.api.service=api@internal" - "traefik.http.routers.api.entrypoints={{ if $.TRAEFIK_LETSENCRYPT_EMAIL }}https{{ else }}http{{ end }}"