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 Farmer
2026-02-28 18:07:07 -05:00
parent ffc724993a
commit 3cf02f9904
5 changed files with 147 additions and 6 deletions

View File

@@ -49,7 +49,16 @@ fn-traefik-template-compose-file() {
dns_provider_env_vars="$(fn-traefik-dns-provider-env-vars)"
fi
local api_entry_point_address api_entry_point_port=""
api_entry_point_address="$(fn-traefik-api-entry-point-address)"
if [[ -n "$api_entry_point_address" ]]; then
api_entry_point_port="${api_entry_point_address##*:}"
fi
local SIGIL_PARAMS=(TRAEFIK_API_ENABLED="$(fn-traefik-api-enabled)"
TRAEFIK_API_ENTRY_POINT="$(fn-traefik-api-entry-point)"
TRAEFIK_API_ENTRY_POINT_ADDRESS="$api_entry_point_address"
TRAEFIK_API_ENTRY_POINT_PORT="$api_entry_point_port"
TRAEFIK_API_VHOST="$(fn-traefik-api-vhost)"
TRAEFIK_BASIC_AUTH="$basic_auth"
TRAEFIK_CHALLENGE_MODE="$(fn-traefik-challenge-mode)"
@@ -111,6 +120,14 @@ fn-traefik-https-entry-point() {
fn-plugin-property-get-default "traefik" "--global" "https-entry-point" "https"
}
fn-traefik-api-entry-point() {
fn-plugin-property-get-default "traefik" "--global" "api-entry-point" ""
}
fn-traefik-api-entry-point-address() {
fn-plugin-property-get-default "traefik" "--global" "api-entry-point-address" ""
}
fn-traefik-challenge-mode() {
fn-plugin-property-get-default "traefik" "--global" "challenge-mode" "tls"
}