From 14e2ead4d2c5b5060b2b8c3e616eef0ebaddf676 Mon Sep 17 00:00:00 2001 From: Louis King Date: Sun, 19 Apr 2026 22:44:36 +0100 Subject: [PATCH] Added subdomain support for web service --- docker-compose.traefik.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker-compose.traefik.yml b/docker-compose.traefik.yml index 7a39c5b..80417cd 100644 --- a/docker-compose.traefik.yml +++ b/docker-compose.traefik.yml @@ -4,6 +4,7 @@ # Requires docker-compose.prod.yml (for the proxy-net network). # # Set TRAEFIK_DOMAIN in your .env file to the hostname for this instance. +# The web service matches the apex domain and all subdomains (e.g. www.meshcore.example.com). # # Prerequisites: # - Traefik configured with Docker provider and attached to proxy-net @@ -27,7 +28,7 @@ services: labels: - "traefik.enable=true" - "traefik.http.services.${COMPOSE_PROJECT_NAME:-hub}-web.loadbalancer.server.port=8080" - - "traefik.http.routers.${COMPOSE_PROJECT_NAME:-hub}-web.rule=Host(`${TRAEFIK_DOMAIN}`)" + - "traefik.http.routers.${COMPOSE_PROJECT_NAME:-hub}-web.rule=Host(`${TRAEFIK_DOMAIN}`) || HostRegexp(`^.+\\.${TRAEFIK_DOMAIN}$`)" - "traefik.http.routers.${COMPOSE_PROJECT_NAME:-hub}-web.entrypoints=websecure" - "traefik.http.routers.${COMPOSE_PROJECT_NAME:-hub}-web.tls=true" - "traefik.http.routers.${COMPOSE_PROJECT_NAME:-hub}-web.tls.certresolver=default"