Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move .env file to .env.dist to avoid update conflicts. #419

Merged
merged 2 commits into from
Jun 12, 2024
Merged

Conversation

mgruner
Copy link
Collaborator

@mgruner mgruner commented Jun 11, 2024

Now that the .env file is only needed if any customizations should be done over the default values, we should move it to .env.dist to ensure that users can safely update from git or via download, copying the new files over.

@mgruner mgruner requested a review from monotek June 11, 2024 11:11
@mgruner
Copy link
Collaborator Author

mgruner commented Jun 11, 2024

@ralf401 FYI

@monotek
Copy link
Member

monotek commented Jun 12, 2024

Not sure if this will work for users already using a changed/cusom env file which would be gone afterwards?
Have you tested it?

@mgruner
Copy link
Collaborator Author

mgruner commented Jun 12, 2024

@monotek you mean when they perform a git pull, that the local changes would be lost? Git prevents this:

error: Your local changes to the following files would be overwritten by checkout:
        .env
Please commit your changes or stash them before you switch branches.
Aborting

Also when they update by downloading the archive and copying over there should be no issue, as the .env file is not deleted.

This is in fact the driver of the current PR, because git update will not work if you have local changes in a file that is controlled by git. So it's better to copy the file to a local, untracked version and modify that one.

@mgruner
Copy link
Collaborator Author

mgruner commented Jun 12, 2024

@monotek just also added .env and docker-compose.override.yml to .gitignore so that it will not complain about adding them to the worktree, if they exist.

@mgruner mgruner merged commit 0b1a832 into master Jun 12, 2024
4 checks passed
@mgruner mgruner deleted the env-dist branch June 12, 2024 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants