Closed michaelshobbs closed 10 years ago
Thanks! This looks great, and I like the ability to override by files in the app repo. I will take some time to review and get back to you soon.
Any more thoughts on this?
Sorry, I've been busy with work, but I will respond to your comments soon. Thanks!
No worries man. Thanks.
Any news on getting this merged, it would really solve an issue im having now
@michaelshobbs Sorry for the delay. From your pull request, I decided to merge the renaming of existing nginx-vhosts plugin. I did not merge "Only install nginx if the version is below 1.4.0" and auto creation of the root VHOST file because I'm now having the install
file just call the existing nginx-vhosts install (see https://github.com/mikexstudios/dokku-nginx-alt/blob/4a0b4ec46a3653fb99c43a370edbcff0b89fe904/install).
I am also not merging "Looks for VHOST at $DOKKU_ROOT/$APP/VHOST first and then defaults to $DOKKU_ROOT/VHOST", because I think it's rare that a root VHOST would be used to set the vhost for multiple apps unless the root VHOST is used as the base domain for subdomain generation. For that use case (which is the default dokku behavior with nginx-vhosts/), I would then suggest using https://github.com/mikexstudios/dokku/tree/subdomain2/plugins/auto-subdomains instead, which I'll put in its own repo sometime.
Finally, I decided to not merge "Allows override of nginx._tpl by including it in the app repo/container". Instead, I am making that a separate plugin: https://github.com/mikexstudios/dokku-app-configfiles. So the nginx._tpl
files are checked into the app under the.dokku/
directory. Then the 'app-configfiles' plugin will automatically copy those files over before this plugin's post-deploy hook is called.
Does all of this sound reasonable to you? Thanks.
@jamescw What issue are you having?
I wanted the ability to configure nginx from a template included in the app repo, it looks like the plugin you mentioned would do that, I'll take a look
— Sent from Mailbox
On Wed, Aug 27, 2014 at 11:17 PM, Michael Huynh notifications@github.com wrote:
@jamescw What issue are you having?
Reply to this email directly or view it on GitHub: https://github.com/mikexstudios/dokku-nginx-alt/pull/12#issuecomment-53634040
Makes sense.
I finally had time to go over your notes in further detail this weekend and I am still left with the question around the VHOST file in the app dir vs. the dokku root dir. I won't argue that it's 'rare' to use the $DOKKU_ROOT/VHOST
to set the vhosts for the all apps. It just happens we provision our instances with the expectation of running only one app.
I will, however, point out that the default dokku nginx-vhosts plugin does expect a VHOST
file in the $DOKKU_ROOT
dir.
https://github.com/progrium/dokku/blob/master/plugins/nginx-vhosts/post-deploy#L7-L8
By not supporting that use case, we are preventing this very powerful plugin from being used as a simple drop-in replacement.
This will...
Tested and running on 10 different apps. Definitely open to feedback.