netbox-community / netbox-docker

🐳 Docker Image of NetBox

Home Page:https://github.com/netbox-community/netbox-docker/wiki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update without backupping the env-files

fzenger7 opened this issue · comments

Desired Behavior

I would like to update my netbox, like described at the wikipage https://github.com/netbox-community/netbox-docker/wiki/Updating, just with pulling the git repository, without moving env-files.

Contrast to Current Behavior

The current behavior is, that I have to copy my customized env-files to another location, then pull the update with git pull and then move back my env-files.

Required Changes

This could be achieved, similar to the docker-compose.override.yml, with an example env-example folder and adding the normal env-folder to the .gitignore, so I can normally pull the update, even if I made changes to the env-files.

Discussion: Benefits and Drawbacks

#1099

You can commit your env files to your local git repository. When updating (I recommend git pull --rebase), git will take care of keeping the changes to your env files.

This could be achieved, similar to the docker-compose.override.yml, with an example env-example folder and adding the normal env-folder to the .gitignore, so I can normally pull the update, even if I made changes to the env-files.

We can think about this. Though this complicates the first-time experience with one extra step. More importantly, when we make changes to the env files, people will not notice, as they have their independent copy.

I also came across this question. Is it possible to update the documentation accordingly and point out this fact? Unfortunately, I am not familiar with Git to do it myself.

The wiki is a community wiki and everyone is welcome to improve it to the best of their knowledge.

commented

maybe the easiest way is to move all your special entries from the env/* files to your docker-compose.override.yml - so they don't interfere with the git pull. at least that's what I did to solve that problem for me