Repository navigation
docs(docker): clarify env sync omission behavior - #43706
Closed
keith991001 wants to merge 2 commits into
Closed
keith991001 wants to merge 2 commits into
keith991001 wants to merge 2 commits into
Conversation
The sync tools rebuild .env from .env.example, so variables absent from the template are omitted even though the documentation claimed that all custom settings were preserved. Clarify the exact retention and backup behavior, and make both implementations warn about the impending omission instead of asking users to remove values that the sync will already drop. AI-assisted: Prepared with Codex and reviewed by the contributor. Test Plan: ```bash git diff --check bash -n docker/dify-env-sync.sh /Users/keith/.local/share/uv/python/cpython-3.12-macos-aarch64-none/bin/python3.12 docker/dify-env-sync.py --help ```
SuperLinter evaluates the entire modified shell script, exposing pre-existing SC2155 and SC2188 warnings. Separate declarations from command substitutions and use an explicit no-op for file initialization without changing synchronization behavior. AI-assisted: Prepared with Codex and reviewed by the contributor. Test Plan: ```bash /opt/homebrew/bin/shellcheck --severity=warning docker/dify-env-sync.sh bash -n docker/dify-env-sync.sh git diff --check ```
Contributor
Author
|
Closing as superseded by the current behavior on main, introduced in #44673. Both sync scripts now append missing template keys while preserving existing values, comments, and extra local variables. The Docker README already documents this. I verified both scripts with a sample .env containing an extra local override. |
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
.env.example.envRoot cause
Both synchronization implementations rebuild
.envexclusively from.env.example. Values are preserved only when their variable names remain in the template, while variables absent from the template are omitted. The existing documentation and warnings described this behavior incorrectly.Test plan
git diff --checkbash -n docker/dify-env-sync.shCloses #43703
AI-assisted: Prepared with Codex and reviewed by the contributor.