-
Notifications
You must be signed in to change notification settings - Fork 1
Config changes and updates #30
Comments
One thought is to keep the nginx.tmpl static and have it include another user-specified template, that way you can change anything in the stock template without impacting user overrides. Other than that, I like the idea of blowing it all away and starting over. |
Thats the problem afaik it is not possible to include other template files - so we cant include them. (except importing the resulting config files) What we also can do is checking if some specific user-config file is present and use this instead of the default one. But this will have the same effect that sometimes if we change something important and the user hasn't updated his own config file the container wont start which is an bad behavior. |
https://github.com/jwilder/nginx-proxy/blob/master/nginx.tmpl#L55-L57 shows an example of nginx.tmpl including another template file if it exists. |
yes thats true but this includes getting handeld by nginx - my problem is a level higher at rancher-gen where the nginx config gets build, and there i can't include custom templates or something like that. |
Ah, okay, you're way ahead of me in understanding that bit of code. :-) |
One big problem i encountered is that every time we change something in our config files (bugfixes and so on) and you upgrade the stack, in the first step you need to change the name of the config folder or something like that or those files don't get overwritten.
But before we could provide an answer we need to define the behaviour we want, i have following ideas for that: (Note: these change is only for config files under /examples/rancher-gen )
We don't care about changes by the user and overwrite these config files on each startup.
We generate an hash from the existing file and check if it is the same hash then the version before - if thats true we overwrite it - if not we write it to the logs that some changes needs to be done. (Problem here might be that a wrong configuration don't let the container start)
One huge problem would be that if we include other config files in the current one thats not always possible (nginx.tmpl)
Input welcome
The text was updated successfully, but these errors were encountered: