-
Notifications
You must be signed in to change notification settings - Fork 21
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
Respect changes in the existing nginx.conf #10
Comments
Hi @motin, Can you give me an example of some attributes of nginx.conf that are clobbered by the domains vhost config? Thanks, |
Sorry, I don't understand the question.
Btw, I sent a pr with the plugin rewritten to use this approach: #11 |
You indicated that some changes to Thanks again, |
Exactly.
All changes made by plugins whose names happen to come after "dokku-domains-plugin" alphabetically, when this plugin has already replaced nginx.conf with it's own version.
Currently the only plugin I know of is https://github.com/neam/dokku-nginx-vhosts-custom-configuration but the implication of this issue is that no other plugins will be developed if the hooks are not sharable amonst plugins. Dokku has chosen pluginhook, and one out of three important aspects is that "Multiple plugins can handle a hook". |
Hi @motin, To be clear Furthermore, adding differing TLD's to Anyway, I appreciate your feedback and passion, but I don't feel that this is an issue for Cheers, |
Exactly, and because of this, If another plugin modifies the app's nginx.conf, those changes are not propagated to the custom domains nginx configuration (nginx-domains.conf). This means that the configuration ends up being either similar but different - a catastrophic situation - between the Or, it can end up with the configuration being simply vastly different from each other, if one is using another plugin that has added custom configuration to nginx.conf. Relevant use cases for when the nginx vhost configuration needs to be customized can be to set proxy timeouts in order to allow long running requests, setting specific SSL directives, enabled uploading of large files and the like. Having to maintain two different set-ups of nginx vhost configuration adds to the maintenance costs and provides more sources for error. If you add a TLD to your heroko app, you can count on the fact that it will work in the same manner as the How btw does a user set these custom nginx directives manually or in his/her own plugin to additional domains - it seems that it is not supported at all. The only ways with this plugin to add, say Creating these extra set of dependencies and require devops or plugin authors to manually synchronize changes between different configuration set-ups is imo a bad thing. Remember the Unix philosophy: "Write programs that do one thing and do it well. Write programs to work together."
Agree. I haven't set-up proper SSL support in #11 , but that is a different issue than the one we are discussing here. I'll reply to this comment in #11 since I believe you simply commented in the wrong thread.
Closing this based on the arguments put forth until now clearly shows that there is a great misunderstanding going on. This issue is still unsolved and clearly affects the usability of the plugin in a larger context. |
My sense is that you're taking on too much scope...both for how these plugins work with each other and what you want from dokku. My sense of dokku is that it is a minimalistic PaaS. And just b/c dokku is modeled after heroku, does not mean that it should mimic all of heroku's behaviors. As indicated in the dokku docs, if someone wants this much control over their vhosts, then they can (a) look at PaaS alternatives such as flynn, (b) manage their vhosts manually, which isn't terribly hard, or (c) use dokku-nginx-vhosts-custom-configuration. My sense of dokku-nginx-vhosts-custom-configuration is that it can work reasonably well without Thanks again for the discussion, |
Agree. Dokku and it's plugins should remain minimalistic in their implementations. Compare the complexity of this plugin and it's readme before and after #11 - which one is more minimalistic?
This doesn't make sense. Yes, (a) flynn could be an alternative down the road, but (b) managing vhosts manually is not an option and (c) the whole point of this issue (#10) is to be able to use dokku-nginx-vhosts-custom-configuration AND dokku-domains-plugin at the same time, which is not possible.
To be clear, these are NOT alternatives to each other. They complement each other. dokku-nginx-vhosts-custom-configuration allows for custom configuration directives but can't add domain aliases to server_name, and dokku-domains-plugin can add custom domains but not custom configuration directives.
Yes it occurs and yes the community often manages but plugin fragmentation is not something to strive for and should be avoided when possible.
I see you are not interested in reconsidering my points above and do not agree with me. Since the first comment on #11 was "this looks awesome! nice job @motin", I still feel that someone else would appreciate the alternative approach, so I'll fork and publish my own version of the plugin, and our future efforts will be fragmented. |
For anyone interested, I released the fork earlier this morning: https://github.com/neam/dokku-custom-domains |
This plugin does not seem to respect the current nginx.conf. If another plugin modifies the app's nginx.conf, those changes are not propagated to the custom domains nginx configuration.
A better approach could be to modify the nginx.conf server_name row using sed during the nginx-pre-reload hook.
The text was updated successfully, but these errors were encountered: