Special config files like `reverse-proxy.config.php` are not updated in existing installations when upgrading
Config files included into docker image are not replacing config files inside volume. This leads to bug fixes not being applied like here: https://github.com/nextcloud/docker/issues/1411#issuecomment-877738211
Underlying cause and some proposed solutions posted by @flortsch in #1837. I particularly like this one:
or maybe better, exclude /config/ but specifically include all the special config files used by this image, such as reverse-proxy.config.php, smtp.config.php, and so on.
Either of you feel up to coming up with a preliminary implementation and submitting it as a PR?
We could also, alternatively, not still not touch things but add a warning message (in the entrypoint when we detect mismatched config files). This would have the following pros versus cons:
Pros:
- Informs people of the possible cause of mysterious issues
- Has 100% backward compatibility (i.e. won't blindly overwrite local customizations people may have made to this "straggler" files )
Cons:
- Requires manual remedy even though probably ~80% of users haven't customized those files
One thought is we:
- Add a warning now
- Document that those files are considered part of the image / not to be messed with (i.e. same as bits of Nextcloud Server) now
- Later on we consider introducing the more intrusive "auto fix" (if ever - but we'd always at least have the option of adding it later on)
Just having the warning would probably trigger a lot of "Oh that's why my Docker instance is never behaving like the docs say / doesn't seem to have current bug fixes / auto config doesn't really work but seems to work for other people" reactions from admins.
It's basically the closest we get to have the integrity check, but for the image itself (well, at least for the auto config parts). 😄
It would be a pretty big win on the user experience and support/issue optimization side of things (I think).
@joshtrichards I provided a PR in https://github.com/nextcloud/docker/pull/2120 that implements your suggested check in the Docker entrypoint. It prints a warning for every special config file that is missing in the user config folder or differs from the original Docker image file. Please provide feedback. Hopefully, we can document and explain this behavior in a better way and provide a future auto-fix that always copies those files on every update.