fix(docker): add tls=true label when certificateType is 'none'#4226
Open
GuillaumeLecomte1 wants to merge 1 commit intoDokploy:canaryfrom
Open
fix(docker): add tls=true label when certificateType is 'none'#4226GuillaumeLecomte1 wants to merge 1 commit intoDokploy:canaryfrom
GuillaumeLecomte1 wants to merge 1 commit intoDokploy:canaryfrom
Conversation
When configuring HTTPS with certificateType='none' in Docker Compose applications, Traefik was not generating the tls=true label on the websecure router, causing HTTPS requests to return 404. This fix adds the missing tls=true label for certificateType='none', allowing Traefik to properly handle TLS termination. Closes Dokploy#4018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When configuring HTTPS with certificateType='none' in Docker Compose applications, Traefik was not generating the tls=true label on the websecure router, causing HTTPS requests to return 404.
This fix adds the missing label for certificateType='none', allowing Traefik to properly handle TLS termination.
Fix
In , added the missing branch that pushes the tls=true label.
Closes #4018
Greptile Summary
Adds the missing
traefik.http.routers.${routerName}.tls=truelabel increateDomainLabelswhencertificateType === "none"on a websecure (or custom HTTPS) entrypoint, fixing HTTPS 404s for Docker Compose apps that rely on a default/pre-installed certificate rather than Let's Encrypt or a named cert resolver.packages/server/src/utils/traefik/domain.tssetsrouterConfig.tls = undefinedfor the same case, which means thetlskey is omitted from the Traefik file config entirely. This could produce the same 404 in regular (non-Compose) application deployments withcertificateType === "none", and may be worth aligning in a follow-up.Confidence Score: 5/5
tls = {}for consistency, but this is pre-existing and not a blocker.Comments Outside Diff (1)
packages/server/src/utils/traefik/domain.ts, line 198-200 (link)certificateType === "none"behavior vs Docker fixThis PR correctly adds
tls=trueforcertificateType === "none"in Docker Compose labels, but the parallel non-Compose path here explicitly setsrouterConfig.tls = undefined, which means notlskey appears in the serialized Traefik file config. Per theHttpRoutertype definition (line 285 infile-types.ts): "When a TLS section is specified, it instructs Traefik that the current router is dedicated to HTTPS requests only." Without it, regular application deployments withcertificateType === "none"may exhibit the same 404 on HTTPS described in Docker Compose: missing tls=true label when certificateType is "none" with HTTPS enabled #4018. Consider aligning this withrouterConfig.tls = {}for consistency.Reviews (1): Last reviewed commit: "fix(docker): add tls=true label when cer..." | Re-trigger Greptile
(4/5) You can add custom instructions or style guidelines for the agent here!