feat: allow customizing the subdomain template for preview deployments#4351
Open
ajnart wants to merge 3 commits intoDokploy:canaryfrom
Open
feat: allow customizing the subdomain template for preview deployments#4351ajnart wants to merge 3 commits intoDokploy:canaryfrom
ajnart wants to merge 3 commits intoDokploy:canaryfrom
Conversation
…omains
Support ${prNumber}, ${branchName}, ${appName}, and ${uniqueId} variables
in the preview wildcard domain field. When ${prNumber} or ${branchName} is
present, no random suffix is appended since these already provide uniqueness.
Falls back to existing behavior when no template variables are used.
Closes Dokploy#4283
Replace the Wildcard Domain field with a Preview Domain Template field that shows available template variables and a live example of the resulting URL. Add unit tests for the interpolation logic covering slugification, DNS length limits, and variable replacement.
afb3d97 to
26440e8
Compare
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
${prNumber},${branchName},${appName},${uniqueId}) to the preview wildcard domain field${prNumber}or${branchName}is present, no random suffix is appended (these are already unique per PR)*.traefik.mevalues work as before with no migration neededTest plan
interpolateSubdomainTemplate(9 tests covering variable replacement, slugification, DNS length truncation, special characters)${prNumber}.previews.example.com, verify preview URL in PR comment*.traefik.mestill works unchangedCloses #4283