From dae4c5f5f2c7a6062cf1cfb2315c3588cf00bb7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Thu, 6 Nov 2025 08:41:02 +0100 Subject: [PATCH] fix: streamline Traefik dashboard labels with HTTP redirect MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated dashboard configuration to match the working pattern from other services (Links, Scrapy, etc): **Changes:** - Added HTTP to HTTPS redirect middleware - Added separate web and web-secure routers - Renamed middleware from dashboard-auth to just auth - Added explicit docker.network label - Now follows the exact same pattern as Links stack **Label Structure:** - web router: HTTP entrypoint with redirect middleware - web-secure router: HTTPS with TLS cert resolver and auth - Consistent naming: proxy-web, proxy-web-secure, proxy-auth This ensures the dashboard works the same way as all other services in the stack. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- proxy/compose.yaml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/proxy/compose.yaml b/proxy/compose.yaml index 230275d..70c836c 100644 --- a/proxy/compose.yaml +++ b/proxy/compose.yaml @@ -64,13 +64,19 @@ services: labels: - 'traefik.enable=true' - # Dashboard router - - 'traefik.http.routers.${PROXY_COMPOSE_PROJECT_NAME}-dashboard.rule=Host(`${PROXY_TRAEFIK_HOST}`)' - - 'traefik.http.routers.${PROXY_COMPOSE_PROJECT_NAME}-dashboard.entrypoints=web-secure' - - 'traefik.http.routers.${PROXY_COMPOSE_PROJECT_NAME}-dashboard.tls.certresolver=resolver' - - 'traefik.http.routers.${PROXY_COMPOSE_PROJECT_NAME}-dashboard.service=api@internal' - - 'traefik.http.middlewares.${PROXY_COMPOSE_PROJECT_NAME}-dashboard-auth.basicauth.users=${PROXY_AUTH_USERS}' - - 'traefik.http.routers.${PROXY_COMPOSE_PROJECT_NAME}-dashboard.middlewares=${PROXY_COMPOSE_PROJECT_NAME}-dashboard-auth' + # HTTP to HTTPS redirect + - 'traefik.http.middlewares.${PROXY_COMPOSE_PROJECT_NAME}-redirect-web-secure.redirectscheme.scheme=https' + - 'traefik.http.routers.${PROXY_COMPOSE_PROJECT_NAME}-web.middlewares=${PROXY_COMPOSE_PROJECT_NAME}-redirect-web-secure' + - 'traefik.http.routers.${PROXY_COMPOSE_PROJECT_NAME}-web.rule=Host(`${PROXY_TRAEFIK_HOST}`)' + - 'traefik.http.routers.${PROXY_COMPOSE_PROJECT_NAME}-web.entrypoints=web' + # HTTPS router with auth + - 'traefik.http.routers.${PROXY_COMPOSE_PROJECT_NAME}-web-secure.rule=Host(`${PROXY_TRAEFIK_HOST}`)' + - 'traefik.http.routers.${PROXY_COMPOSE_PROJECT_NAME}-web-secure.tls.certresolver=resolver' + - 'traefik.http.routers.${PROXY_COMPOSE_PROJECT_NAME}-web-secure.entrypoints=web-secure' + - 'traefik.http.routers.${PROXY_COMPOSE_PROJECT_NAME}-web-secure.service=api@internal' + - 'traefik.http.middlewares.${PROXY_COMPOSE_PROJECT_NAME}-auth.basicauth.users=${PROXY_AUTH_USERS}' + - 'traefik.http.routers.${PROXY_COMPOSE_PROJECT_NAME}-web-secure.middlewares=${PROXY_COMPOSE_PROJECT_NAME}-auth' + - 'traefik.docker.network=${NETWORK_NAME}' volumes: letsencrypt_data: name: ${PROXY_COMPOSE_PROJECT_NAME}_letsencrypt_data