Commit Graph

56 Commits

Author SHA1 Message Date
Michael Hobbs
33f872183e initial pass at container-level scaling 2015-04-21 14:27:23 -07:00
Michael Hobbs
043b055558 don't use set to guard against pipefail 2015-02-11 17:48:55 -08:00
Michael Hobbs
9164740117 rename log functions with dokku_log_ prefix 2015-02-06 08:28:14 -08:00
Michael Hobbs
6ad65dd9b4 first stab at a common functions library. include argument parsing and a few definitions wired up. closes #932. closes #945 2015-02-05 11:32:46 -08:00
Michael Hobbs
948d7902f2 bind docker container to internal port if using vhosts 2015-01-02 16:27:19 -08:00
Michael Hobbs
4e0670f1ac rebuild nginx config on domain change 2014-12-12 17:53:30 -08:00
Jose Diaz-Gonzalez
11b126a845 Do not overwrite URL file 2014-12-11 02:14:52 -05:00
Jose Diaz-Gonzalez
605ba27eeb Use a one-liner for the "Configuring" echo statement 2014-12-11 02:12:46 -05:00
Jose Diaz-Gonzalez
8109c9c569 Delete the VHOST file, not the URL file, when NO_VHOST is set
The URL file is useful for understanding what port docker decided to host our app internally on.
2014-12-11 02:10:49 -05:00
Jose Diaz-Gonzalez
4955f9c600 Fix test for file 2014-12-11 01:36:44 -05:00
Jose Diaz-Gonzalez
e84526490e Move VHOST file creation to a single domains:setup command
This helps remove duplication and also ensures that all hosts have a proper setup after running `make copyfiles`

Note that this command is not exposed in help as it is not generally useful to developers
2014-12-11 01:36:44 -05:00
Jose Diaz-Gonzalez
f23809e75f Implement the ability to set multiple server names for a given application
Adding a hostname to the $APP/VHOST file will enable it as a virtualhost for the application.

In addition, any hostname set that matches an associated ssl certificate will also be set as an ssl host. Note that if a hostname does not have a matching SSL host, then it will result in an erroring application.

For the moment, running `dokku url` on an app may not correctly display the current hostnames for said app.
2014-12-11 01:36:44 -05:00
Jose Diaz-Gonzalez
b967514c55 Allow overriding of the nginx.conf template via nginx.conf.template 2014-12-11 01:36:44 -05:00
Jose Diaz-Gonzalez
a6c34ddd6f Use a template to create an application's nginx.conf 2014-12-11 01:36:44 -05:00
Jose Diaz-Gonzalez
8f0e794893 Remove extra dash 2014-12-11 01:36:44 -05:00
Jose Diaz-Gonzalez
68a1d1af38 one-liner 2014-12-11 01:36:44 -05:00
Jose Diaz-Gonzalez
eeff3d52eb Combine calls to restart nginx into a single command 2014-12-11 01:36:44 -05:00
Jose Diaz-Gonzalez
8aa196c660 Remove extra reload command 2014-12-11 01:36:44 -05:00
Jose Diaz-Gonzalez
20977fc2a2 Fix NO_VHOST check
It used to check if NO_VHOST is unset or set to the empty string
It now checks if NO_VHOST is set to a non-empty string
2014-11-24 02:16:21 -05:00
Thomas Boerger
14b1743c2a Added openSUSE support
I have done the first steps to get dokku running for other distros like
openSUSE. I have simply replaced the important places within the core
plugins with a check for DOKKU_DISTRO that gets exported by dokku
itself. It just replaces the apt-get and service start/restart/reload
functionality with the openSUSE counterparts.
2014-11-23 11:37:58 +01:00
Jose Diaz-Gonzalez
4754f241f2 Add the ability to customize an app's hostname using the nginx-hostname pluginhook
Closes #254
2014-11-22 17:18:33 -05:00
Jose Diaz-Gonzalez
69f360864f Disable nginx vhosts via dokku config:set myapp NO_VHOST=1. Closes #485 2014-11-22 16:42:55 -05:00
Fredrik Wollsén
580f89e63b Plugin nginx-vhosts includes files in folder nginx.conf.d 2014-11-16 13:14:24 +02:00
Jose Diaz-Gonzalez
f13c1031c7 Ensure there is a newline after calling set -e 2014-11-16 02:54:54 -05:00
Jose Diaz-Gonzalez
db7e36e0ca Revert "Add CNAME option" 2014-09-29 23:44:23 -04:00
Jeff Lindsay
4e9d797d45 Merge pull request #657 from arthurnn/CNAME_option
Add CNAME option
2014-08-19 16:28:43 -05:00
Arthur Neves
0cd1839ce8 Add CNAME option
When a repo have a CNAME file, it will use the URL on it to map the server_name on ngnix
2014-08-14 14:43:35 -04:00
Assaf Arkin
00ec004871 Zero down-time deploy and server checks
This change makes Dokku start up the new container, run a set of checks
against it, and only switch traffic over to the new containers if all
checks complete successfully. No requests are dropped during the switch
over.

To specify checks, add a CHECKS file to the root of your project
directory. This is a text file with one line per check. Empty lines and
lines starting with # are ignored.

A check is a relative URL and may be followed by expected content from
the page, for example:

  /about     Our Amazing Team

Even if you don’t use any checks, this change will prevent downtime
during switching from old to new container.

See: https://labnotes.org/zero-downtime-deploy-with-dokku/
2014-04-28 21:28:50 -07:00
Stafford Brunk
e2135a2c5f Change cert folder name from ssl to tls 2014-04-08 06:48:50 -06:00
Stafford Brunk
22c25dc40a Implement nginx spdy support 2014-04-03 07:20:18 -06:00
Stafford Brunk
dfac47cbe2 Allow symlinks for SSL cert detection in nginx-vhosts post-deploy 2014-04-03 07:15:21 -06:00
Stafford Brunk
bd5b2b210c Factor common SSL settings out to the http block 2014-04-03 07:05:30 -06:00
Stafford Brunk
e33f5c94a5 Use listen 443 ssl instead of ssl on in vhost conf file 2014-04-03 07:04:35 -06:00
Lukas Schauer
95c9656fc8 nginx vhost ipv6 compatibility
IPv6 Compatibility (Nginx Default Site is IPv6 compatible, resulting in not-working vhosts when AAAA DNS entry is set)
2013-11-27 12:03:38 -08:00
Paul Lietar
83ce81fc51 Enable tracing in hooks when DOKKU_TRACE is set.
This makes it much easier to debug plugins.
Also source the 'dokkurc' file when starting dokku. This makes it easy
to define DOKKU_TRACE over ssh.
2013-11-18 20:59:48 +00:00
rhy-jot
3c1666076e Silence nginx reloading 2013-10-30 17:17:53 -07:00
Jeff Lindsay
df7507d1be normalizing shebang and bash options. also added long-term fix for bootstrap instructions 2013-10-29 17:13:02 -05:00
Paul Lietar
b5c8dd7436 Use DOKKU_ROOT instead of HOME.
HOME is not consistent if dokku is ran e.g. as root (for setup).
The DOKKU_ROOT variable will also make it possible to have the repositories stored in an arbitrary location (works-ish right now)
2013-10-28 21:15:17 +00:00
Jose Diaz-Gonzalez
bcfaefa896 Enable 'nginx reload' support for git and dokku user. Refs #124. Refs #186 2013-10-25 02:42:49 -04:00
Alexander
85f14baad5 Introduce URL for app. Plugins can override this.
fixes #242
2013-10-24 13:44:05 +02:00
Jason Staten
ba1f1bc30d Add X-Forwarded-Port and X-Request-Start
Adding additional proxy headers to match what Heroku provides. Also,
X-Request-Start is compatible with NewRelic's latest agent[1].

[1]: http://blog.newrelic.com/2013/02/21/using-new-relic-on-heroku-read-how-our-new-ruby-agent-measures-queue-time/
2013-09-09 15:46:19 -06:00
Jason Staten
7f4f46a1e2 Set X-Forwarded-Proto Header
Heroku passes the X-Forwarded-Proto header to indicate the protocol of
the incoming request[1]. Ruby's rack relies on this header to
determine if a request is HTTPS[2].

Also, the X-Scheme header was removed to eliminate redundant passing of
the scheme.

[1]: https://devcenter.heroku.com/articles/http-routing#heroku-headers
[2]: https://github.com/rack/rack/blob/master/lib/rack/request.rb#L77
2013-09-09 12:12:01 -06:00
Jeffery Utter
1a7d68a3fc Add nginx configure hook
This adds a pluginhook for nginx-configure to be called after the main nginx configuration is called and before nginx is reloaded. This will allow other plugins to modify the nginx configuration
2013-08-27 09:47:41 -05:00
rhy-jot
84cf39bf09 Merge pull request #145 from msumpter/patch-2
Added X-Forwarded-For to pass client IP to backend
2013-08-15 21:10:09 -07:00
alexanderbeletsky
5ef7b00243 review comment by @rhy-jot 2013-08-08 10:17:39 +03:00
alexanderbeletsky
9e9cc0c96e issue #138: added wildcard support 2013-08-05 18:17:53 +03:00
Mat Sumpter
2f92d500f8 Added X-Forwarded-For to pass client IP to backend 2013-08-05 09:37:40 -04:00
alexanderbeletsky
33a3b85674 ssl ciphers config from @rhy-jot 2013-07-31 07:00:46 +03:00
alexanderbeletsky
7f6e6ee8a4 review issues by @progrium 2013-07-24 12:13:50 +03:00
alexanderbeletsky
3bd0f6d3fb issue #101: added ssl configuration
- application folder /ssl is detected and ssl hginx config added
- readme corrections
2013-07-23 22:01:04 +03:00