Commit Graph

25 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
c7b71b5d92 lint: remove unnecessary negation
Also use double-brackets where possible.

Fixes SC2236
2019-02-02 13:52:18 -05:00
Jose Diaz-Gonzalez
86795ddacc tests: run mvdan/shfmt on test runs
While I do not agree with _every_ style change, this will force Dokku to have consistent formatting across all shell scripts, which is arguably a Good Thing™.

The command used to reprocess everything is:

```shell
shfmt -l -bn -ci -i 2 -w .
```
2019-01-07 01:25:55 -05:00
Jose Diaz-Gonzalez
bf84f13938 refactor: move all vhost related functions to the domains plugin
These should never have been in common, and more directly relate to domain handling than anything else.

As this is a BC-break, merging will need to wait until the next minor.
2018-02-24 14:52:06 -05:00
Jose Diaz-Gonzalez
7c30babdec fix: Ensure VHOST files exist before executing commands against them
Closes #2609
2017-02-19 19:57:09 -05:00
Ilya Semenov
6a9b3f6df2 Add domains:set and domains:set-global commands 2016-11-28 22:44:06 +07:00
Kazuhiro NISHIYAMA
ccc44b0c16 Fix bug when VHOST without newline 2016-11-14 22:21:41 +09:00
Mirko Geissler
bdc3353a5c Remove domains:set-global command 2016-07-05 09:49:26 +02:00
Mirko Geissler
fa9c09ee7d Make description plural 2016-07-05 09:47:22 +02:00
Mirko Geissler
371949f4ec Create default app domain for every global domain 2016-07-05 09:45:17 +02:00
Mirko Geissler
164f48913f Add domains_add_global and domains_remove_global 2016-07-05 09:45:17 +02:00
Mirko Geissler
6286962c5c Use local 2016-07-05 09:45:17 +02:00
Mirko Geissler
0ae459a933 Remove unused local 2016-07-05 09:45:17 +02: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
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
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
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
Michael Hobbs
3e18d9aff9 create functions for app/global vhost detection. make VHOST setting more explicit 2015-09-18 16:48:18 -07:00
Michael Hobbs
4dd4d7c567 initial pass at nginx proxy without VHOST. closes #1123 2015-09-17 19:09:38 -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
a983456030 remove magic additions to VHOST based on SSL cert. fixes #1368 2015-09-03 22:35:00 -04:00