diff --git a/packages/server/src/utils/docker/domain.ts b/packages/server/src/utils/docker/domain.ts index 28ede3085..090bf02ed 100644 --- a/packages/server/src/utils/docker/domain.ts +++ b/packages/server/src/utils/docker/domain.ts @@ -268,6 +268,12 @@ export const createDomainLabels = async ( `traefik.http.routers.${routerName}.service=${routerName}`, ]; + if (domain.path && domain.path.length > 0 && domain.path !== "/") { + labels.push( + `traefik.http.routers.${routerName}.rule=PathPrefix(\`${domain.path}\`)`, + ); + } + if (entrypoint === "web" && https) { labels.push( `traefik.http.routers.${routerName}.middlewares=redirect-to-https@file`,