zammad / zammad-docker-compose

Zammad Docker images for docker-compose
https://hub.docker.com/r/zammad/zammad-docker-compose/
GNU Affero General Public License v3.0
268 stars 207 forks source link

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

Closed mgruner closed 3 months ago

mgruner commented 3 months ago

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 commented 3 months ago

@ralf401 FYI

monotek commented 3 months ago

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 commented 3 months ago

@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 commented 3 months ago

@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.