fix: do not wrap safe Environment-tab values in extra quotes - #5105
Open
BetterAndBetterII wants to merge 2 commits into
Open
fix: do not wrap safe Environment-tab values in extra quotes#5105BetterAndBetterII wants to merge 2 commits into
BetterAndBetterII wants to merge 2 commits into
Conversation
prepareEnvironmentVariablesForFile quoted every value, so docker stack deploy treated the quotes as part of the value. Emit values containing only safe characters (including : / @ = _) exactly as entered. Fixes Dokploy#5096 Co-authored-by: Yuzhong Zhang <BetterAndBetterII@users.noreply.github.com>
Match the example value from Dokploy#5096 and keep quoting for $, #, and spaces. Co-authored-by: Yuzhong Zhang <BetterAndBetterII@users.noreply.github.com>
3 tasks
This was referenced Aug 18, 2026
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.
What is this PR about?
Environment-tab values were always written to the generated
.envasKEY="value". That is valid dotenv fordocker compose, butdocker stack deploydoes not strip those quotes, so they become part of the value.A Sentry DSN such as
https://examplePublicKey@o0000000000000000.ingest.sentry.io/0000000000000000was deployed as"https://..."(quotes became part of the value) instead of the entered URL, which breaks URL parsing.prepareEnvironmentVariablesForFilenow emits values exactly as entered when they do not need dotenv quoting. Characters such as: / @ = _no longer add quotes. Values that still need quoting for Compose ($,#, whitespace,",\) keep the existing escape path so #4694 stays fixed.Checklist
canary: / @ = _Issues related (if applicable)
Fixes #5096
Greptile Summary
This PR updates generated
.envfiles to leave dotenv-safe values unquoted, preventing Docker Stack from preserving unwanted quote characters.Confidence Score: 5/5
The PR appears safe to merge, with no concrete changed-code failure identified.
The generated environment-file output preserves unquoted safe values for Docker Stack while continuing to quote and escape values containing dotenv-sensitive characters.
Reviews (1): Last reviewed commit: "test: assert Sentry DSN is emitted witho..." | Re-trigger Greptile
Context used: