fix(compose): preserve env interpolation references - #5158
Open
mameikagou wants to merge 1 commit into
Open
Conversation
mameikagou
marked this pull request as ready for review
August 22, 2026 02:14
Comment on lines
+553
to
+559
| const isVariableReference = | ||
| source[offset - 1] !== "$" && | ||
| (/^\{[A-Za-z_][A-Za-z0-9_]*(?:(?::[-+?]|[-+?])[^}]*)?\}/.test( | ||
| suffix, | ||
| ) || | ||
| /^[A-Za-z_][A-Za-z0-9_]*/.test(suffix)); | ||
| return isVariableReference ? match : `\\${match}`; |
Contributor
There was a problem hiding this comment.
Resolved values become references
When a project, environment, or service placeholder resolves to a literal value containing $VAR or ${VAR}, this classifier preserves that sequence as active Compose interpolation, causing Docker Compose to expand or erase part of the deployed secret or configuration value.
Knowledge Base Used: Application Deployment Flow
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?
Preserve valid Docker Compose
${VAR}and$VARreferences when writing deployment environment files, while continuing to escape literal dollar signs such aspa$$word. Regression coverage checks both forms through the existing environment-file path.Checklist
canary.CONTRIBUTING.md.Issues related
Closes #5151
Validation
git diff --checkGreptile Summary
This PR selectively preserves Docker Compose
$VARand${VAR}interpolation references while continuing to escape literal dollar signs, with focused unit and Compose integration coverage.Confidence Score: 4/5
This PR should not merge until resolved project, environment, and service-placeholder values are prevented from being reinterpreted as Docker Compose references.
The new classifier runs after Dokploy placeholder substitution, so literal dollar sequences inside resolved secrets or configuration values can be expanded or erased by Docker Compose.
Files Needing Attention: packages/server/src/utils/docker/utils.ts
Reviews (1): Last reviewed commit: "fix(compose): preserve env interpolation..." | Re-trigger Greptile
Context used: