Commit Graph

272 Commits

Author SHA1 Message Date
Michael Hobbs
c83fbad205 xip.io style vhosts with tests. closes #1005 2015-03-19 11:23:00 -07:00
Alex Vidal
3b1e0ceb51 Support xip.io wildcard DNS as a VHOST
http://xip.io

xip.io is a service by Basecamp that provides a wildcard DNS service on the public internet. Any <ip address>.xip.io will return a DNS response for the IP address, same with <subdomain>.<ip address>.xip.io.

The domains plugin in dokku uses a regex to match IP4 and IP6 addresses in the VHOST file, and disables VHOST support if found. This PR changes those patterns to require that the VHOST entry **ends with** the IP address.

This is a gist where my VHOST setting is "127.0.0.1.xip.io" that demonstrates the original output, linked directly to the line from `plugins/domains/commands`: https://gist.github.com/anonymous/c529177f20b36beda80d#file-debug-log-L1373
2015-03-19 11:23:00 -07:00
Michael Hobbs
767b45ae56 use config:set-norestart 2015-03-19 08:09:11 -07:00
Michael Hobbs
1a7586cd03 don't use config:set 2015-03-19 07:54:45 -07:00
Michael Hobbs
2834ce1f1a extract first port from Dockerfile and set config variable for use in deploy phase. closes #993 2015-03-19 07:54:45 -07:00
Jose Diaz-Gonzalez
fafa33e40d Merge pull request #1036 from progrium/908_mh-configset-norestart
create config set/unset without restart. closes #908
2015-03-19 10:52:31 -04:00
Michael Hobbs
72c829e29b default container check. closes #1020 2015-03-17 12:17:33 -07:00
Michael Hobbs
6cb770bf1c create config set/unset without restart. closes #908 2015-03-17 09:49:19 -07:00
Michael Hobbs
ee039fe4f1 lintball. disable SC1001 2015-03-16 12:43:34 -07:00
Assaf Arkin
052e3e88c8 ADDED several enhancements for CHECKS file:
- Specify how long to wait before running first check
- Specify timeout for each check
- Check specific hosts, e.g. http://signin.example.com
- Check both HTTP and HTTPS resources
2015-03-14 10:13:36 -07:00
Jose Diaz-Gonzalez
110d8a4863 Merge pull request #1026 from progrium/1025_mh-newlines-and-such
ensure we have newlines around our config. closes #1025
2015-03-11 04:24:01 -04:00
Michael Hobbs
88cd81e390 ensure we have newlines around our config. closes #1025 2015-03-09 19:32:05 -07:00
Michael Hobbs
42ee978549 Merge pull request #1013 from lmars/fix-urls
Fix URL schemes in `dokku urls` output
2015-03-09 12:05:25 -07:00
Michael Hobbs
b468c2e09e Merge pull request #1008 from lmars/fix-nginx-multiple-ssl-vhosts
Support multiple domains using a wildcard TLS certificate
2015-03-09 12:05:20 -07:00
Lewis Marshall
9202f110ab Fix wildcard TLS domain detection
As per RFC 2818 [0], a CN of *.dokku.me will only match direct
subdomains of dokku.me, not sub-subdomains like www.test.dokku.me, but
Dokku currently enables TLS for subdomains of all levels.

I have changed the regex from .*\.dokku\.me to [^.]*\.dokku\.me so TLS
is only enabled for direct subdomains.

[0] - http://tools.ietf.org/html/rfc2818#section-3.1

Signed-off-by: Lewis Marshall <lewis@lmars.net>
2015-03-08 21:32:31 +00:00
Lewis Marshall
3a7e1bfa16 Fix URL schemes in dokku urls output
Previously, the presence of TLS certificates would cause `dokku urls` to
output all https URLs, even for domains which were not configured to use
TLS.

This change introduces a URLS file in the app's directory which contains
the URLs with schemes based on whether they have been configured to use
TLS in the nginx config.

Signed-off-by: Lewis Marshall <lewis@lmars.net>
2015-03-01 01:29:38 +00:00
Lewis Marshall
a4d79e2de9 Support multiple domains using a wildcard TLS certificate
Previous to this change, each TLS domain would be written to nginx.conf
using the nginx.ssl.conf template (lines 69-73) but with an empty
"server_name" directive (because NOSSL_SERVER_NAME was not set).

This would then become irrelevant because nginx.conf would get truncated
on line 88, and a single parsing of the template would then be written to
nginx.conf on line 89, meaning only the last TLS domain would be set up to
actually use TLS.

This patch changes this behaviour so that all TLS domains get added to
nginx.conf using the nginx.ssl.conf template (which includes redirecting
HTTP -> HTTPS), and all non-TLS domains get added using the nginx.conf
template, so do not get redirected to a TLS domain.

Signed-off-by: Lewis Marshall <lewis@lmars.net>
2015-02-26 01:58:17 +00:00
Michael Hobbs
fb8f08d280 remove quoting from dockerfile env. closes #1002 2015-02-24 11:56:54 -08:00
Michael Hobbs
12777d9bf0 simplify SSL hostname handling and avoid overwriting variables. refs #971 2015-02-12 13:27:47 -08:00
Michael Hobbs
043b055558 don't use set to guard against pipefail 2015-02-11 17:48:55 -08:00
Michael Hobbs
e5fb746a7f only look for long args in global space. allows for short args in plugins. closes #963 2015-02-09 16:59:07 -08:00
Michael Hobbs
ef583eef66 use consistent bash shebang. closes #959 2015-02-08 22:34:35 -08:00
Michael Hobbs
179a5e611b introduce pre/post-build-buildstep and pre/post-release-buildstep 2015-02-07 17:56:01 -08:00
Michael Hobbs
7357df7c9d first pass at dockerfile support 2015-02-07 17:56:01 -08:00
Michael Hobbs
1cfb1fc3fc implement dokku shell and ls (by @plietar). refs #312 2015-02-07 14:46:17 -08:00
Michael Hobbs
959c51eb50 refactor function defs to be posix-like. remove usage of force positional argument in tests. support --force like arguments in client" 2015-02-07 11:35:04 -08:00
Michael Hobbs
fe3e079a93 [ci skip] rename -rm to --rm for DOKKU_RM_CONTAINER 2015-02-07 09:28:09 -08:00
Michael Hobbs
9164740117 rename log functions with dokku_log_ prefix 2015-02-06 08:28:14 -08:00
Michael Hobbs
371ba99540 include echo functions that don't print when quiet arg is passed 2015-02-05 12:38:59 -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
Jose Diaz-Gonzalez
72a58bbda3 Merge pull request #927 from progrium/906-mh-docker-args-phase-pluginhooks
support both docker-args PHASE and docker-args-PHASE for the time being. closes #906
2015-02-04 11:13:14 -05:00
Michael Hobbs
30d660335f Merge pull request #941 from progrium/931-mh-source-glabal-env-deploy-run
source global env prior to app env. closes #931
2015-02-04 07:32:12 -08:00
Michael Hobbs
b48464a7e2 Merge pull request #925 from progrium/mh-ps-rebuild
implement rebuild command that reuses git_archive_all
2015-02-03 14:56:44 -08:00
Michael Hobbs
5fb30ab934 source global env prior to app env. closes #931 2015-02-03 13:47:20 -08:00
Vincent Fretin
955f95e899 enable ssl_prefer_server_ciphers
Since we create /etc/nginx/nginx.conf we don't have "ssl_prefer_server_ciphers on" option enabled anymore, enable it in dokku.conf
2015-02-03 09:52:18 +01:00
Michael Hobbs
1b22f69b9e support both docker-args PHASE and docker-args-PHASE for the time being. closes #906 2015-01-29 18:33:20 -08:00
Michael Hobbs
c96d139f54 use flock when (re)building/deploying 2015-01-28 16:18:57 -08:00
Michael Hobbs
9f985077c7 implement rebuild command that reuses git_archive_all 2015-01-27 15:00:00 -08:00
Michael Hobbs
4ad0c3022e use tty cmd to detect if we have one. closes #921 2015-01-24 20:00:11 -08:00
Michael Hobbs
3e100e3002 conditionally set interactive and tty on dokku run.
closes #552
closes #913
2015-01-21 13:49:46 -08:00
Jose Diaz-Gonzalez
b8851a66cf Merge pull request #894 from progrium/dokku-client
Dokku client
2015-01-18 17:43:09 -05:00
Michael Hobbs
d7830fa730 prevent error on restartall when no apps deployed 2015-01-16 17:41:32 -08:00
Michael Hobbs
55c2b0fd62 allow force override 2015-01-16 14:57:49 -08:00
Jose Diaz-Gonzalez
19871fe81d Merge pull request #900 from progrium/mh-nginx-ssl-san-hostname
support extracting SANs from SSL certificates and adding them to nginx config
2015-01-16 15:22:15 -05:00
Jose Diaz-Gonzalez
514d66f40d Merge pull request #891 from progrium/keep-old
Keep existing configuration files when installing nginx. Refs #886
2015-01-16 15:19:57 -05:00
Michael Hobbs
6cd89fa72a support extracting SANs from SSL certificates and adding them to nginx config 2015-01-15 12:08:27 -08:00
Michael Hobbs
e760e1cc92 implement ps:restartall. closes #82 #218 2015-01-14 16:37:49 -08:00
Michael Hobbs
9490889411 allow ps to be used by plugins that support pre container actions 2015-01-14 16:25:13 -08:00
Michael Hobbs
61e154899b use ps:restart for config and domains plugins 2015-01-14 15:25:53 -08:00
Michael Hobbs
c0028f122b initial pass at a ps plugin 2015-01-14 15:19:58 -08:00