- changed the username (dokku instead of git)
- fixes the nginx reload command in post-deploy
- default app subdomain gets created, and removed when an domain is added
dokku-nginx-alt is a alternative plugin for dokku that configures nginx as a reverse proxy to deployed dokku app. There are a number of design changes between this plugin and the standard built in dokku-vhosts plugin:
- Moved configuration file from
post-deployinto separate template files:nginx.confandnginx.ssl.conf. - Ability to override default .conf files with user's own nginx configuration
files placed in
/home/git/$APP. - Ability to deploy an app under multiple custom domains. The
VHOSTfile can now contain a list of domains that nginx will serve to. - Command to show/add/remove/clear custom domains in a heroku-like manner. e.g.,
dokku domains:add myapp mydomain.com. VHOSTfile is decoupled frompost-deployin thatpost-deployno longer overwritesVHOSTafter each deploy. Custom domains are set independently using thedomains:addcommand and dokku no longer needs to guess at the domain.- Ability to mix SSL and non-SSL domains. For example,
VHOSTmay containmydomain.comand*.mydomain.comwhere SSL certificates only apply to*.mydomain.com. This plugin generates both SSL configurations for the wildcard domains and non-SSL configuration for the root domain. - Added helper messages during deploy.
-
Remove the default
nginx-vhostplugin:rm -rf /var/lib/dokku/plugins/nginx-vhost
-
Install the plugin by cloning into the dokku plugins directory:
git clone https://github.com/jtangelder/dokku-nginx-alt.git /var/lib/dokku/plugins/dokku-nginx-alt
-
Re-push your app.
-
To show/add/remove/clear custom domains, see:
dokku domains:help:$ dokku domains:help Configure VHOST domains: domains <appname> # list custom domains for app domains:help <appname> # this help message domains:add <appname> DOMAIN # add a custom domain to app domains:clear <appname> # clear all custom domains for app domains:remove <appname> DOMAIN # remove a custom domain from app
-
To over-ride the default
nginx.confandnginx.ssl.conftemplates, place copies renamed asnginx.templateandnginx.ssl.templatein your/home/git/$APPdirectory. When you re-push your application, you should see a message like:-----> Overriding default SSL nginx.conf with detected nginx.template...