feat(traefik-vhosts): support custom entrypoint for API/dashboard

Add two new global-only properties to configure a dedicated Traefik entrypoint
for the API and dashboard, enabling network isolation on private interfaces.
Includes comprehensive test coverage for property management and compose config.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
Matt FarmerandClaude Haiku 4.5 committed 2026-02-28 18:07:07 -05:00
1 parent ffc724993a
commit 3cf02f9904
5 files changed
+147 -6

No files matched your search

@@ -9,6 +9,9 @@ services:
- --entrypoints.http.http.redirections.entrypoint.scheme=https
- --entrypoints.https.address=:443
{{ end }}
{{ if and ($.TRAEFIK_API_ENTRY_POINT) ($.TRAEFIK_API_ENTRY_POINT_ADDRESS) }}
- --entrypoints.{{ $.TRAEFIK_API_ENTRY_POINT }}.address={{ $.TRAEFIK_API_ENTRY_POINT_ADDRESS }}
{{ end }}
- --providers.docker
- --providers.docker.exposedByDefault=false
- --api={{ $.TRAEFIK_API_ENABLED }}
@@ -52,7 +55,7 @@ services:
- "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 }}"
- "traefik.http.routers.api.entrypoints={{ if $.TRAEFIK_API_ENTRY_POINT }}{{ $.TRAEFIK_API_ENTRY_POINT }}{{ else if $.TRAEFIK_LETSENCRYPT_EMAIL }}https{{ else }}http{{ end }}"
{{ end }}
{{ if $.TRAEFIK_BASIC_AUTH }}
@@ -60,7 +63,7 @@ services:
- "traefik.http.middlewares.auth.basicauth.users={{ $.TRAEFIK_BASIC_AUTH }}"
{{ end }}
{{ if $.TRAEFIK_LETSENCRYPT_EMAIL }}
{{ if and ($.TRAEFIK_LETSENCRYPT_EMAIL) (not $.TRAEFIK_API_ENTRY_POINT) }}
- "traefik.http.routers.api.tls.certresolver=leresolver"
{{ end }}
@@ -71,6 +74,9 @@ services:
{{ if $.TRAEFIK_LETSENCRYPT_EMAIL }}
- "443:443"
{{ end }}
{{ if and ($.TRAEFIK_API_ENTRY_POINT) ($.TRAEFIK_API_ENTRY_POINT_ADDRESS) }}
- "{{ $.TRAEFIK_API_ENTRY_POINT_ADDRESS }}:{{ $.TRAEFIK_API_ENTRY_POINT_PORT }}"
{{ end }}
restart: unless-stopped