71 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
bdd2b4bfe5 Release 0.6.2 2016-06-20 21:16:21 -04:00
Jose Diaz-Gonzalez
ed06b8961e Release 0.6.1 2016-06-18 23:54:00 -04:00
Jose Diaz-Gonzalez
833db67f25 Release 0.6.0 2016-06-18 01:53:48 -04:00
Jose Diaz-Gonzalez
b71c5b668f Release 0.5.8 2016-06-10 22:40:57 -04:00
Michael Hobbs
9a29cc59a8 reject invalid domains in domains:add. closes #2231 2016-06-10 13:10:11 -07:00
Michael Hanselmann
e0f6435d86 Fix removal of domains with schema
In at least one case a customer of ours added a domain including
a schema, as in “http://domain.tld/”. That is obviously incorrect, but
then they couldn't remove it using the dokku command:

  $ dokku domains:remove app7 http://domain.tld/
  sed: -e expression #1, char 9: unknown command: `/'

This patch changes the sed command to use the "\CregexpC" syntax. The
character used is a vertical pipe, which is far less likely to be used
in a URL. After the change:

  $ dokku domains:remove app7 http://domain.tld/
  -----> Removed http://domain.tld/ from app7

Signed-off-by: Michael Hanselmann <hansmi@vshn.ch>
2016-06-08 11:34:30 +02:00
Jose Diaz-Gonzalez
2da58ff351 Release 0.5.7 2016-05-17 03:15:27 -04:00
Jeroen van Baarsen
86ef6ae5d1 Make sure we shift by 1 to remove the app_name from the $@ var 2016-05-10 21:31:53 +02:00
Jeroen van Baarsen
4f621916a7 Dont fail when adding a duplicated domain
Currently we exit when trying to add a duplicated domain, even if we give a list
of domain names. This behaviour is not as it suppose to work.

**Expected behaviour**
When adding a domain, and the domain already exists, just skip that domain, and
continue with the world. This is no problem since we are already in the state we
want to be in.

**New behaviour**
When you try to add a domain that is already added, we notify the user of this
by showing a log message: `Skipping: example.com already added to example app`,
and then we continue with the list of domain names.

Fixes #2165
2016-05-10 08:58:15 +02:00
Jose Diaz-Gonzalez
e9447a26d9 Release 0.5.6 2016-04-29 16:07:58 -04:00
Jose Diaz-Gonzalez
a13a0df35e Release 0.5.5 2016-04-13 13:32:04 -04:00
Jose Diaz-Gonzalez
f328a9940b Release 0.5.4 2016-04-05 03:09:29 -04:00
Jose Diaz-Gonzalez
9dfe14fe33 Release 0.5.3 2016-03-30 01:24:14 -04:00
Jose Diaz-Gonzalez
12ca7adcd1 Release 0.5.2 2016-03-27 17:09:36 -04:00
Jose Diaz-Gonzalez
668dc0e7a5 Release 0.5.1 2016-03-26 19:54:25 -04:00
Michael Hobbs
de9b1f6273 [ci skip] make help desc local consistent 2016-03-22 13:33:35 -07:00
Justin Clark
14a1d06c03 Collapse help into expandable command topics 2016-03-22 10:50:20 -07:00
Michael Hobbs
987c5cfb9c use declare for description variable 2016-03-08 15:30:34 -05:00
Michael S. Hobbs
89f289b433 subcommand restructure and bashstyle refactor. closes #1579 2016-03-03 22:11:35 -08:00
Justin Clark
86b4987588 Depreciate and remove dokku backup plugin, replace with documentation 2016-03-02 15:56:33 -08:00
Michael Hobbs
d1b87bd7b7 cleanup shellcheck SC2086 2016-02-23 07:50:06 -08:00
Michael Hobbs
9842d7498b nginx-vhosts rewrite 2016-02-18 18:38:54 -08:00
Jeroen van Baarsen
90ea6a5ba4 Make plugin hooks send out more information
Add this point you only get information that "something" happend on the given
hook. By adding more information to the hook, plugin creators can do more
interesting stuff.

* The first params remains the $APP name (to maintain backwards compatability)
* The second params sends in the action that happend, for domain this can be:
  "add", "clear" or "remove"
* The third param sends in the argument that was passed to the original
  function, for domain that would be a list of all the domains that was given.

One reason this addition would be great for plugin owners, is that when you have
a web tool over Dokku, and someone creates a domain over the CLI, we a plugin
can send back information about the event to the webapp over an API. That way
the webapp is always up-to-date with the Dokku installation.

Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-12-12 17:02:28 +01:00
Michael Hobbs
6a51ec0f64 Merge pull request #1709 from progrium/1614_mh-wildcard-domains
fix Must specify DOMAIN error over ssh (supercedes #1691)
2015-11-19 14:10:20 -05:00
Michael Hobbs
4b2a777425 add test for wildcard domain. don't match domain substring. closes #1614 2015-11-19 12:03:31 -05:00
Michael Hobbs
498d52ecdf don't call nginx_build_config twice and make ip regex functions globally accessible 2015-11-19 09:10:04 -05:00
Justin Clark
59912d43f1 fix Must specify DOMAIN error over ssh 2015-11-13 18:02:07 -08:00
Michael Hobbs
fd44635e74 Merge remote-tracking branch 'origin/reduce-trace-output' into 1123_mh-nginx-novhost 2015-09-18 17:34:32 -07:00
Michael Hobbs
3e18d9aff9 create functions for app/global vhost detection. make VHOST setting more explicit 2015-09-18 16:48:18 -07:00
Jose Diaz-Gonzalez
f914e6207b Consolidate ipv4/ipv6 regex declarations behing nginx-vhosts plugin 2015-09-18 16:15:26 -04:00
Jose Diaz-Gonzalez
70511c340d Check if command is implemented in a plugin before executing plugin code
Because of how plugin commands are implemented, their output can be incredibly verbose. Rather than executing even the `set -eo pipefail` parts of a plugin, we immediately check if the command is implemented by a plugin. If it is not, then we continue on as normal.

One side-effect of this change is that plugin commands need to be duplicated again:

- once in the command array
- once for the actual body of the command
- once in the help output

This is also quite hackish, and probably not the best way to decrease trace output. Note that we drop approximately 2k lines worth of logs with this change.
2015-09-18 16:09:59 -04:00
Jose Diaz-Gonzalez
467264d31f Drop another ~1k lines from DOKKU_TRACE output 2015-09-18 16:09:59 -04:00
Michael Hobbs
4dd4d7c567 initial pass at nginx proxy without VHOST. closes #1123 2015-09-17 19:09:38 -07:00
Jose Diaz-Gonzalez
27a2478a33 Follow bashstyle where possible 2015-09-16 16:06:31 -07:00
Jose Diaz-Gonzalez
c929edfbe5 Source plugins from $PLUGIN_AVAILABLE_PATH when not using common plugin
This will allow us to override any core plugin
2015-09-15 02:22:08 -07:00
Michael Hobbs
8095df79f6 implement core plugin mgmt using plugn. add tests. 2015-09-15 02:17:28 -07:00
Jose Diaz-Gonzalez
ad72a137e1 Fix sourcing of functions 2015-09-15 02:16:40 -07:00
Michael Hobbs
7a545759f2 initial pass at switching to plugn 2015-09-15 02:16:40 -07:00
Jose Diaz-Gonzalez
95161a2a9f Use dokku_log_fail in all cases where there is an exit 1 2015-09-04 00:17:45 -04:00
Michael Hobbs
a983456030 remove magic additions to VHOST based on SSL cert. fixes #1368 2015-09-03 22:35:00 -04:00
Jose Diaz-Gonzalez
646fd467ab use config_set function in domains and 00_dokku-standard 2015-09-01 00:55:05 -04:00
Jim Myhrberg
d5df6a4190 Use $PLUGIN_PATH instead of $(dirname $0)/..
As briefly discussed in #1425, source the `common/functions` file via an
absolute path, rather than determining the relative path by using
`dirname`. 3rd-party plugins should follow suit and use the new
`$PLUGIN_PATH` convention too.
2015-08-28 14:14:28 +01:00
Jose Diaz-Gonzalez
a1e747f4ad Guard against missing VHOST files
This can occur if the app isn't using vhosts but the user runs the command.
2015-08-26 00:15:09 -04:00
Randall Leeds
183edc9839 Remove uses of (un)set-norestart 2015-08-24 15:57:34 -07:00
Michael Hobbs
b30db17def use column to format help output 2015-07-28 09:31:56 -07:00
Michael Hobbs
a84397895a initial pass at config plugin arguments refactor 2015-07-06 19:41:17 -07:00
Michael Hobbs
dce031d38d don't re-deploy on domains:add. allow multple domains on command line. closes #1142 2015-04-24 15:41:32 -07:00
Jose Diaz-Gonzalez
b5495ed0c3 use helper functions instead of echo command 2015-04-21 01:14:10 -04:00
Michael Hobbs
62774b156d use config:set-norestart in domains plugin. config:get for dockerfile port. closes #1041 2015-04-07 20:49:34 -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