From efa88d00870cc084447a3f518781772cf0969529 Mon Sep 17 00:00:00 2001 From: Pranav Goel Date: Sat, 29 Oct 2016 14:29:28 +0530 Subject: [PATCH 01/68] Update README.md --- README.md | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index f52a76cb1..1d09d0e46 100644 --- a/README.md +++ b/README.md @@ -7,26 +7,31 @@ Docker powered mini-Heroku. The smallest PaaS implementation you've ever seen. ## Requirements -- A fresh VM running `Debian 8.2 x64`, `Ubuntu 14.04 x64`, or `Ubuntu 16.04 x64` +A fresh VM running any one of +- `Debian 8.2 x64` +- `Ubuntu 14.04 x64` +- `Ubuntu 16.04 x64` -## Installing +## Installation -To install the latest stable release, you can run the following commands as a user that has access to `sudo`: +To install the latest stable release, run the following commands as a user who has access to `sudo`: - wget https://raw.githubusercontent.com/dokku/dokku/v0.7.2/bootstrap.sh - sudo DOKKU_TAG=v0.7.2 bash bootstrap.sh +``` +wget https://raw.githubusercontent.com/dokku/dokku/v0.7.2/bootstrap.sh +sudo DOKKU_TAG=v0.7.2 bash bootstrap.sh +``` You can then proceed to the ip address or domain name associated with your server to complete the web-based installation. -If you wish for a more unattended installation method, see [these](http://dokku.viewdocs.io/dokku/getting-started/install/debian/#unattended-installation) docs. +If you wish for a more unattended installation method, you can see [these](http://dokku.viewdocs.io/dokku/getting-started/install/debian/#unattended-installation) docs. -### Upgrading +### Upgrade -[View the docs for upgrading](http://dokku.viewdocs.io/dokku/getting-started/upgrading/) from an older version of Dokku. +[View the docs] for upgrading(http://dokku.viewdocs.io/dokku/getting-started/upgrading/) from an older version of Dokku. ## Documentation -Full documentation - including advanced installation docs - are available online at [docs](http://dokku.viewdocs.io/dokku/) +Full documentation - including advanced installation docs - are available online [here](http://dokku.viewdocs.io/dokku/) ## Support From 2e1d8def403cff184865382893510ae953200980 Mon Sep 17 00:00:00 2001 From: Pranav Goel Date: Sat, 29 Oct 2016 14:30:42 +0530 Subject: [PATCH 02/68] Update SPONSORS.md --- SPONSORS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SPONSORS.md b/SPONSORS.md index 4c7c0b9bc..eb1cd5b87 100644 --- a/SPONSORS.md +++ b/SPONSORS.md @@ -1,3 +1,5 @@ +#Sponsors + [Deis](http://deis.io) [DigitalOcean](https://www.digitalocean.com/) From d001fcc89609b7d69f5358d5330cf5cb464e2796 Mon Sep 17 00:00:00 2001 From: Omar Shehata Date: Mon, 28 Nov 2016 02:53:46 +0000 Subject: [PATCH 03/68] Added certs default help function --- plugins/certs/commands | 23 +++-------------------- plugins/certs/functions | 24 ++++++++++++++++++++++++ plugins/certs/subcommands/default | 13 +++++++++++++ 3 files changed, 40 insertions(+), 20 deletions(-) create mode 100644 plugins/certs/subcommands/default diff --git a/plugins/certs/commands b/plugins/certs/commands index c34b902c8..e04a558a3 100755 --- a/plugins/certs/commands +++ b/plugins/certs/commands @@ -1,31 +1,14 @@ #!/usr/bin/env bash [[ " help certs:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT" set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x +source "$PLUGIN_AVAILABLE_PATH/certs/functions" case "$1" in help | certs:help) - help_content_func () { - declare desc="return certs plugin help content" - cat< CRT KEY, Add an ssl endpoint to an app. Can also import from a tarball on stdin - certs:chain CRT [CRT ...], [NOT IMPLEMENTED] Print the ordered and complete chain for the given certificate - certs:generate DOMAIN, Generate a key and certificate signing request (and self-signed certificate) - certs:info , Show certificate information for an ssl endpoint - certs:key CRT KEY [KEY ...], [NOT IMPLEMENTED] Print the correct key for the given certificate - certs:remove , Remove an SSL Endpoint from an app - certs:rollback , [NOT IMPLEMENTED] Rollback an SSL Endpoint for an app - certs:update CRT KEY, Update an SSL Endpoint on an app. Can also import from a tarball on stdin -help_content - } + if [[ $1 = "certs:help" ]] ; then - echo -e 'Usage: dokku certs:COMMAND' - echo '' - echo 'Manage Dokku apps SSL (TLS) certs.' - echo '' - echo 'Additional commands:' - help_content_func | sort | column -c2 -t -s, + help_formatted else help_content_func fi diff --git a/plugins/certs/functions b/plugins/certs/functions index a130c993e..77d10de83 100755 --- a/plugins/certs/functions +++ b/plugins/certs/functions @@ -2,6 +2,30 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" +help_formatted (){ + echo -e 'Usage: dokku certs:COMMAND' + echo '' + echo 'Manage Dokku apps SSL (TLS) certs.' + echo '' + echo 'Additional commands:' + help_content_func | sort | column -c2 -t -s, +} + +help_content_func () { + declare desc="return certs plugin help content" + cat< CRT KEY, Add an ssl endpoint to an app. Can also import from a tarball on stdin + certs:chain CRT [CRT ...], [NOT IMPLEMENTED] Print the ordered and complete chain for the given certificate + certs:generate DOMAIN, Generate a key and certificate signing request (and self-signed certificate) + certs:info , Show certificate information for an ssl endpoint + certs:key CRT KEY [KEY ...], [NOT IMPLEMENTED] Print the correct key for the given certificate + certs:remove , Remove an SSL Endpoint from an app + certs:rollback , [NOT IMPLEMENTED] Rollback an SSL Endpoint for an app + certs:update CRT KEY, Update an SSL Endpoint on an app. Can also import from a tarball on stdin +help_content + } + is_ssl_enabled() { declare desc="returns 0 if ssl is enabled for given app" local APP=$1; verify_app_name "$APP" diff --git a/plugins/certs/subcommands/default b/plugins/certs/subcommands/default new file mode 100644 index 000000000..f9869973a --- /dev/null +++ b/plugins/certs/subcommands/default @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x +source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" +source "$PLUGIN_AVAILABLE_PATH/certs/functions" + +certs_main_cmd() { + declare desc="return certs plugin help content" + local cmd="certs" + help_formatted +} + +certs_main_cmd "$@" + From 74db5b9d3bd57501227a8bbf71c5c09573af7127 Mon Sep 17 00:00:00 2001 From: Omar Shehata Date: Mon, 28 Nov 2016 02:59:32 +0000 Subject: [PATCH 04/68] Added ssh-keys default help function --- plugins/ssh-keys/commands | 18 +++--------------- plugins/ssh-keys/functions | 19 +++++++++++++++++++ plugins/ssh-keys/subcommands/default | 12 ++++++++++++ 3 files changed, 34 insertions(+), 15 deletions(-) create mode 100644 plugins/ssh-keys/subcommands/default diff --git a/plugins/ssh-keys/commands b/plugins/ssh-keys/commands index bfd36a0ce..a205bd054 100755 --- a/plugins/ssh-keys/commands +++ b/plugins/ssh-keys/commands @@ -1,26 +1,14 @@ #!/usr/bin/env bash [[ " help ssh-keys:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT" set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x +source "$PLUGIN_AVAILABLE_PATH/ssh-keys/functions" case "$1" in help | ssh-keys:help) - help_content_func () { - declare desc="return ssh-keys plugin help content" - cat< [/path/to/key], Add a new public key by pipe or path - ssh-keys:remove , Remove SSH public key by name -help_content - } + if [[ $1 = "ssh-keys:help" ]] ; then - echo -e 'Usage: dokku ssh-keys[:COMMAND]' - echo '' - echo 'Manage public ssh keys that are allowed to connect to Dokku' - echo '' - echo 'Additional commands:' - help_content_func | sort | column -c2 -t -s, + help_formatted else help_content_func fi diff --git a/plugins/ssh-keys/functions b/plugins/ssh-keys/functions index 24b5e6807..262eacc44 100755 --- a/plugins/ssh-keys/functions +++ b/plugins/ssh-keys/functions @@ -2,6 +2,25 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" +help_formatted (){ + echo -e 'Usage: dokku ssh-keys[:COMMAND]' + echo '' + echo 'Manage public ssh keys that are allowed to connect to Dokku' + echo '' + echo 'Additional commands:' + help_content_func | sort | column -c2 -t -s, +} + +help_content_func () { + declare desc="return ssh-keys plugin help content" + cat< [/path/to/key], Add a new public key by pipe or path + ssh-keys:remove , Remove SSH public key by name +help_content + } + verify_ssh_key_file() { declare desc="Test that public key is valid" [[ -s ${DOKKU_ROOT}/.ssh/authorized_keys ]] || dokku_log_fail "No public keys found." diff --git a/plugins/ssh-keys/subcommands/default b/plugins/ssh-keys/subcommands/default new file mode 100644 index 000000000..9b31420a5 --- /dev/null +++ b/plugins/ssh-keys/subcommands/default @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x +source "$PLUGIN_AVAILABLE_PATH/config/functions" +source "$PLUGIN_AVAILABLE_PATH/ssh-keys/functions" + +ssh_keys_main_cmd() { + declare desc="return ssh-keys plugin help content" + local cmd="ssh-keys" + help_formatted +} + +ssh_keys_main_cmd "$@" From 810ba72879bbc0092929aa8c987c7cdeb3c3179f Mon Sep 17 00:00:00 2001 From: Omar Shehata Date: Mon, 28 Nov 2016 03:03:30 +0000 Subject: [PATCH 05/68] Added nginx default help function --- plugins/nginx-vhosts/commands | 18 +++--------------- plugins/nginx-vhosts/functions | 19 +++++++++++++++++++ plugins/nginx-vhosts/subcommands/default | 13 +++++++++++++ 3 files changed, 35 insertions(+), 15 deletions(-) create mode 100644 plugins/nginx-vhosts/subcommands/default diff --git a/plugins/nginx-vhosts/commands b/plugins/nginx-vhosts/commands index f7911fc25..2995231d7 100755 --- a/plugins/nginx-vhosts/commands +++ b/plugins/nginx-vhosts/commands @@ -1,26 +1,14 @@ #!/usr/bin/env bash [[ " help nginx:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT" set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x +source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/functions" case "$1" in help | nginx:help) - help_content_func () { - declare desc="return nginx plugin help content" - cat<, (Re)builds nginx config for given app - nginx:access-logs [-t], Show the nginx access logs for an application (-t follows) - nginx:error-logs [-t], Show the nginx error logs for an application (-t follows) -help_content - } + if [[ $1 = "nginx:help" ]] ; then - echo -e 'Usage: dokku nginx[:COMMAND]' - echo '' - echo 'Interact with Dokku'"'"'s Nginx proxy.' - echo '' - echo 'Additional commands:' - help_content_func | sort | column -c2 -t -s, + help_formatted else help_content_func fi diff --git a/plugins/nginx-vhosts/functions b/plugins/nginx-vhosts/functions index 2b6f6bc4b..e98e2e704 100755 --- a/plugins/nginx-vhosts/functions +++ b/plugins/nginx-vhosts/functions @@ -6,6 +6,25 @@ source "$PLUGIN_AVAILABLE_PATH/config/functions" source "$PLUGIN_AVAILABLE_PATH/domains/functions" source "$PLUGIN_AVAILABLE_PATH/ps/functions" +help_formatted (){ + echo -e 'Usage: dokku nginx[:COMMAND]' + echo '' + echo 'Interact with Dokku'"'"'s Nginx proxy.' + echo '' + echo 'Additional commands:' + help_content_func | sort | column -c2 -t -s, +} + +help_content_func () { + declare desc="return nginx plugin help content" + cat<, (Re)builds nginx config for given app + nginx:access-logs [-t], Show the nginx access logs for an application (-t follows) + nginx:error-logs [-t], Show the nginx error logs for an application (-t follows) +help_content + } + validate_nginx() { declare desc="validate entire nginx config" set +e diff --git a/plugins/nginx-vhosts/subcommands/default b/plugins/nginx-vhosts/subcommands/default new file mode 100644 index 000000000..30cb86061 --- /dev/null +++ b/plugins/nginx-vhosts/subcommands/default @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x +source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" +source "$PLUGIN_AVAILABLE_PATH/config/functions" +source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/functions" + +nginx_main_cmd() { + declare desc="display nginx plugin help content" + local cmd="nginx" + help_formatted +} + +nginx_main_cmd "$@" From 42947934520d1ca0f151650fbb52f5256f47cfe7 Mon Sep 17 00:00:00 2001 From: Omar Shehata Date: Mon, 28 Nov 2016 03:06:30 +0000 Subject: [PATCH 06/68] Added storage default help function --- plugins/storage/commands | 17 ++--------------- plugins/storage/functions | 19 +++++++++++++++++++ plugins/storage/subcommands/default | 12 ++++++++++++ 3 files changed, 33 insertions(+), 15 deletions(-) create mode 100644 plugins/storage/subcommands/default diff --git a/plugins/storage/commands b/plugins/storage/commands index 337f07473..03d73207f 100755 --- a/plugins/storage/commands +++ b/plugins/storage/commands @@ -1,26 +1,13 @@ #!/usr/bin/env bash [[ " storage:help help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT" set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x +source "$PLUGIN_CORE_AVAILABLE_PATH/storage/functions" case "$1" in help | storage:help) - help_content_func () { - declare desc="return storage plugin help content" - cat<, List bind mounts for app's container(s) (host:container) - storage:mount , Create a new bind mount - storage:unmount , Remove an existing bind mount -help_content - } if [[ $1 = "shell:help" ]] ; then - echo -e 'Usage: dokku storage:COMMAND' - echo '' - echo 'Mount local volume / directories inside containers.' - echo '' - echo 'Additional commands:' - help_content_func | sort | column -c2 -t -s, + help_formatted else help_content_func fi diff --git a/plugins/storage/functions b/plugins/storage/functions index 767059f13..02752b0bc 100755 --- a/plugins/storage/functions +++ b/plugins/storage/functions @@ -2,6 +2,25 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" +help_formatted (){ + echo -e 'Usage: dokku storage:COMMAND' + echo '' + echo 'Mount local volume / directories inside containers.' + echo '' + echo 'Additional commands:' + help_content_func | sort | column -c2 -t -s, +} + +help_content_func () { + declare desc="return storage plugin help content" + cat<, List bind mounts for app's container(s) (host:container) + storage:mount , Create a new bind mount + storage:unmount , Remove an existing bind mount +help_content + } + verify_paths() { declare desc="verifies storage paths" echo "$1" | grep -qe '^/.*\:/' || dokku_log_fail "Storage path must be two valid paths divided by colon." diff --git a/plugins/storage/subcommands/default b/plugins/storage/subcommands/default new file mode 100644 index 000000000..764a9f5a0 --- /dev/null +++ b/plugins/storage/subcommands/default @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x +source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" +source "$PLUGIN_CORE_AVAILABLE_PATH/storage/functions" + +storage_main_cmd() { + declare desc="Display storage plugin help content" + local cmd="storage" + help_formatted +} + +storage_main_cmd "$@" From 0fed122a992d30e84ab4920aa564d67e8da3c0ab Mon Sep 17 00:00:00 2001 From: Omar Shehata Date: Sat, 3 Dec 2016 19:07:34 +0000 Subject: [PATCH 07/68] Revert "Added storage default help function" This reverts commit 42947934520d1ca0f151650fbb52f5256f47cfe7. --- plugins/storage/commands | 17 +++++++++++++++-- plugins/storage/functions | 19 ------------------- plugins/storage/subcommands/default | 12 ------------ 3 files changed, 15 insertions(+), 33 deletions(-) delete mode 100644 plugins/storage/subcommands/default diff --git a/plugins/storage/commands b/plugins/storage/commands index 03d73207f..337f07473 100755 --- a/plugins/storage/commands +++ b/plugins/storage/commands @@ -1,13 +1,26 @@ #!/usr/bin/env bash [[ " storage:help help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT" set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$PLUGIN_CORE_AVAILABLE_PATH/storage/functions" case "$1" in help | storage:help) + help_content_func () { + declare desc="return storage plugin help content" + cat<, List bind mounts for app's container(s) (host:container) + storage:mount , Create a new bind mount + storage:unmount , Remove an existing bind mount +help_content + } if [[ $1 = "shell:help" ]] ; then - help_formatted + echo -e 'Usage: dokku storage:COMMAND' + echo '' + echo 'Mount local volume / directories inside containers.' + echo '' + echo 'Additional commands:' + help_content_func | sort | column -c2 -t -s, else help_content_func fi diff --git a/plugins/storage/functions b/plugins/storage/functions index 02752b0bc..767059f13 100755 --- a/plugins/storage/functions +++ b/plugins/storage/functions @@ -2,25 +2,6 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" -help_formatted (){ - echo -e 'Usage: dokku storage:COMMAND' - echo '' - echo 'Mount local volume / directories inside containers.' - echo '' - echo 'Additional commands:' - help_content_func | sort | column -c2 -t -s, -} - -help_content_func () { - declare desc="return storage plugin help content" - cat<, List bind mounts for app's container(s) (host:container) - storage:mount , Create a new bind mount - storage:unmount , Remove an existing bind mount -help_content - } - verify_paths() { declare desc="verifies storage paths" echo "$1" | grep -qe '^/.*\:/' || dokku_log_fail "Storage path must be two valid paths divided by colon." diff --git a/plugins/storage/subcommands/default b/plugins/storage/subcommands/default deleted file mode 100644 index 764a9f5a0..000000000 --- a/plugins/storage/subcommands/default +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" -source "$PLUGIN_CORE_AVAILABLE_PATH/storage/functions" - -storage_main_cmd() { - declare desc="Display storage plugin help content" - local cmd="storage" - help_formatted -} - -storage_main_cmd "$@" From 010c89e8104dafa0b2b9fcfae6d008af33306d64 Mon Sep 17 00:00:00 2001 From: Omar Shehata Date: Sat, 3 Dec 2016 19:08:02 +0000 Subject: [PATCH 08/68] Revert "Added ssh-keys default help function" This reverts commit 74db5b9d3bd57501227a8bbf71c5c09573af7127. --- plugins/ssh-keys/commands | 18 +++++++++++++++--- plugins/ssh-keys/functions | 19 ------------------- plugins/ssh-keys/subcommands/default | 12 ------------ 3 files changed, 15 insertions(+), 34 deletions(-) delete mode 100644 plugins/ssh-keys/subcommands/default diff --git a/plugins/ssh-keys/commands b/plugins/ssh-keys/commands index a205bd054..bfd36a0ce 100755 --- a/plugins/ssh-keys/commands +++ b/plugins/ssh-keys/commands @@ -1,14 +1,26 @@ #!/usr/bin/env bash [[ " help ssh-keys:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT" set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$PLUGIN_AVAILABLE_PATH/ssh-keys/functions" case "$1" in help | ssh-keys:help) - + help_content_func () { + declare desc="return ssh-keys plugin help content" + cat< [/path/to/key], Add a new public key by pipe or path + ssh-keys:remove , Remove SSH public key by name +help_content + } if [[ $1 = "ssh-keys:help" ]] ; then - help_formatted + echo -e 'Usage: dokku ssh-keys[:COMMAND]' + echo '' + echo 'Manage public ssh keys that are allowed to connect to Dokku' + echo '' + echo 'Additional commands:' + help_content_func | sort | column -c2 -t -s, else help_content_func fi diff --git a/plugins/ssh-keys/functions b/plugins/ssh-keys/functions index 262eacc44..24b5e6807 100755 --- a/plugins/ssh-keys/functions +++ b/plugins/ssh-keys/functions @@ -2,25 +2,6 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" -help_formatted (){ - echo -e 'Usage: dokku ssh-keys[:COMMAND]' - echo '' - echo 'Manage public ssh keys that are allowed to connect to Dokku' - echo '' - echo 'Additional commands:' - help_content_func | sort | column -c2 -t -s, -} - -help_content_func () { - declare desc="return ssh-keys plugin help content" - cat< [/path/to/key], Add a new public key by pipe or path - ssh-keys:remove , Remove SSH public key by name -help_content - } - verify_ssh_key_file() { declare desc="Test that public key is valid" [[ -s ${DOKKU_ROOT}/.ssh/authorized_keys ]] || dokku_log_fail "No public keys found." diff --git a/plugins/ssh-keys/subcommands/default b/plugins/ssh-keys/subcommands/default deleted file mode 100644 index 9b31420a5..000000000 --- a/plugins/ssh-keys/subcommands/default +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$PLUGIN_AVAILABLE_PATH/config/functions" -source "$PLUGIN_AVAILABLE_PATH/ssh-keys/functions" - -ssh_keys_main_cmd() { - declare desc="return ssh-keys plugin help content" - local cmd="ssh-keys" - help_formatted -} - -ssh_keys_main_cmd "$@" From 0062227c579689727e0399aae09a9b538dfc0c0c Mon Sep 17 00:00:00 2001 From: Omar Shehata Date: Sat, 3 Dec 2016 19:08:25 +0000 Subject: [PATCH 09/68] Revert "Added certs default help function" This reverts commit d001fcc89609b7d69f5358d5330cf5cb464e2796. --- plugins/certs/commands | 23 ++++++++++++++++++++--- plugins/certs/functions | 24 ------------------------ plugins/certs/subcommands/default | 13 ------------- 3 files changed, 20 insertions(+), 40 deletions(-) delete mode 100644 plugins/certs/subcommands/default diff --git a/plugins/certs/commands b/plugins/certs/commands index e04a558a3..c34b902c8 100755 --- a/plugins/certs/commands +++ b/plugins/certs/commands @@ -1,14 +1,31 @@ #!/usr/bin/env bash [[ " help certs:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT" set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$PLUGIN_AVAILABLE_PATH/certs/functions" case "$1" in help | certs:help) - + help_content_func () { + declare desc="return certs plugin help content" + cat< CRT KEY, Add an ssl endpoint to an app. Can also import from a tarball on stdin + certs:chain CRT [CRT ...], [NOT IMPLEMENTED] Print the ordered and complete chain for the given certificate + certs:generate DOMAIN, Generate a key and certificate signing request (and self-signed certificate) + certs:info , Show certificate information for an ssl endpoint + certs:key CRT KEY [KEY ...], [NOT IMPLEMENTED] Print the correct key for the given certificate + certs:remove , Remove an SSL Endpoint from an app + certs:rollback , [NOT IMPLEMENTED] Rollback an SSL Endpoint for an app + certs:update CRT KEY, Update an SSL Endpoint on an app. Can also import from a tarball on stdin +help_content + } if [[ $1 = "certs:help" ]] ; then - help_formatted + echo -e 'Usage: dokku certs:COMMAND' + echo '' + echo 'Manage Dokku apps SSL (TLS) certs.' + echo '' + echo 'Additional commands:' + help_content_func | sort | column -c2 -t -s, else help_content_func fi diff --git a/plugins/certs/functions b/plugins/certs/functions index 77d10de83..a130c993e 100755 --- a/plugins/certs/functions +++ b/plugins/certs/functions @@ -2,30 +2,6 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" -help_formatted (){ - echo -e 'Usage: dokku certs:COMMAND' - echo '' - echo 'Manage Dokku apps SSL (TLS) certs.' - echo '' - echo 'Additional commands:' - help_content_func | sort | column -c2 -t -s, -} - -help_content_func () { - declare desc="return certs plugin help content" - cat< CRT KEY, Add an ssl endpoint to an app. Can also import from a tarball on stdin - certs:chain CRT [CRT ...], [NOT IMPLEMENTED] Print the ordered and complete chain for the given certificate - certs:generate DOMAIN, Generate a key and certificate signing request (and self-signed certificate) - certs:info , Show certificate information for an ssl endpoint - certs:key CRT KEY [KEY ...], [NOT IMPLEMENTED] Print the correct key for the given certificate - certs:remove , Remove an SSL Endpoint from an app - certs:rollback , [NOT IMPLEMENTED] Rollback an SSL Endpoint for an app - certs:update CRT KEY, Update an SSL Endpoint on an app. Can also import from a tarball on stdin -help_content - } - is_ssl_enabled() { declare desc="returns 0 if ssl is enabled for given app" local APP=$1; verify_app_name "$APP" diff --git a/plugins/certs/subcommands/default b/plugins/certs/subcommands/default deleted file mode 100644 index f9869973a..000000000 --- a/plugins/certs/subcommands/default +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" -source "$PLUGIN_AVAILABLE_PATH/certs/functions" - -certs_main_cmd() { - declare desc="return certs plugin help content" - local cmd="certs" - help_formatted -} - -certs_main_cmd "$@" - From 1f47803324b08708212ccd553b73c75098cf83a4 Mon Sep 17 00:00:00 2001 From: Omar Shehata Date: Sat, 3 Dec 2016 19:27:49 +0000 Subject: [PATCH 10/68] Added certs plugin default to info --- plugins/certs/functions | 33 +++++++++++++++++++++++++++++++ plugins/certs/subcommands/default | 12 +++++++++++ plugins/certs/subcommands/info | 32 ------------------------------ 3 files changed, 45 insertions(+), 32 deletions(-) create mode 100644 plugins/certs/subcommands/default diff --git a/plugins/certs/functions b/plugins/certs/functions index a130c993e..55c0ea953 100755 --- a/plugins/certs/functions +++ b/plugins/certs/functions @@ -2,6 +2,39 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" +certs_info_cmd() { + # This is here because it's used in both the info and the default + declare desc="prints SSL certificate info for app" + local cmd="certs:info" + [[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on" + verify_app_name "$2" + local APP="$2"; local APP_SSL_PATH="$DOKKU_ROOT/$APP/tls" + + if [[ -n "$APP_SSL_PATH" ]]; then + dokku_log_info1 "Fetching SSL Endpoint info for $APP..." + dokku_log_info1 "Certificate details:" + dokku_log_info2 "Common Name(s): " + + for domain in $(get_ssl_hostnames "$APP" | xargs); do + dokku_log_info2 " $domain" + done + + dokku_log_info2 "Expires At: $(openssl x509 -in "$APP_SSL_PATH/server.crt" -noout -text | grep "Not After :" | awk -F " : " '{ print $2 }')" + dokku_log_info2 "Issuer: $(openssl x509 -in "$APP_SSL_PATH/server.crt" -noout -text | grep "Issuer:" | xargs | sed -e "s/Issuer: //g")" + dokku_log_info2 "Starts At: $(openssl x509 -in "$APP_SSL_PATH/server.crt" -noout -text | grep "Not Before:" | awk -F ": " '{ print $2 }')" + dokku_log_info2 "Subject: $(openssl x509 -in "$APP_SSL_PATH/server.crt" -noout -subject | sed -e "s:subject= ::g"| sed -e "s:^/::g" | sed -e "s:/:; :g")" + local SSL_VERIFY_OUTPUT="$(openssl verify -verbose -purpose sslserver "$APP_SSL_PATH/server.crt" | awk -F ':' '{ print $2 }' | tail -1 | xargs || true)" + if [[ "$SSL_VERIFY_OUTPUT" == "OK" ]]; then + local SSL_SELF_SIGNED="verified by a certificate authority." + else + local SSL_SELF_SIGNED="self signed." + fi + dokku_log_info2 "SSL certificate is $SSL_SELF_SIGNED" + else + dokku_log_info1 "$APP does not have an SSL endpoint" + fi +} + is_ssl_enabled() { declare desc="returns 0 if ssl is enabled for given app" local APP=$1; verify_app_name "$APP" diff --git a/plugins/certs/subcommands/default b/plugins/certs/subcommands/default new file mode 100644 index 000000000..5eabd33b8 --- /dev/null +++ b/plugins/certs/subcommands/default @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x +source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" +source "$PLUGIN_AVAILABLE_PATH/certs/functions" + +certs_main_cmd() { + declare desc="an alias for certs:info" + local cmd="certs" + certs_info_cmd "$@" +} + +certs_main_cmd "$@" diff --git a/plugins/certs/subcommands/info b/plugins/certs/subcommands/info index cfda760d8..77fd90b7c 100755 --- a/plugins/certs/subcommands/info +++ b/plugins/certs/subcommands/info @@ -3,36 +3,4 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" source "$PLUGIN_AVAILABLE_PATH/certs/functions" -certs_info_cmd() { - declare desc="prints SSL certificate info for app" - local cmd="certs:info" - [[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on" - verify_app_name "$2" - local APP="$2"; local APP_SSL_PATH="$DOKKU_ROOT/$APP/tls" - - if [[ -n "$APP_SSL_PATH" ]]; then - dokku_log_info1 "Fetching SSL Endpoint info for $APP..." - dokku_log_info1 "Certificate details:" - dokku_log_info2 "Common Name(s): " - - for domain in $(get_ssl_hostnames "$APP" | xargs); do - dokku_log_info2 " $domain" - done - - dokku_log_info2 "Expires At: $(openssl x509 -in "$APP_SSL_PATH/server.crt" -noout -text | grep "Not After :" | awk -F " : " '{ print $2 }')" - dokku_log_info2 "Issuer: $(openssl x509 -in "$APP_SSL_PATH/server.crt" -noout -text | grep "Issuer:" | xargs | sed -e "s/Issuer: //g")" - dokku_log_info2 "Starts At: $(openssl x509 -in "$APP_SSL_PATH/server.crt" -noout -text | grep "Not Before:" | awk -F ": " '{ print $2 }')" - dokku_log_info2 "Subject: $(openssl x509 -in "$APP_SSL_PATH/server.crt" -noout -subject | sed -e "s:subject= ::g"| sed -e "s:^/::g" | sed -e "s:/:; :g")" - local SSL_VERIFY_OUTPUT="$(openssl verify -verbose -purpose sslserver "$APP_SSL_PATH/server.crt" | awk -F ':' '{ print $2 }' | tail -1 | xargs || true)" - if [[ "$SSL_VERIFY_OUTPUT" == "OK" ]]; then - local SSL_SELF_SIGNED="verified by a certificate authority." - else - local SSL_SELF_SIGNED="self signed." - fi - dokku_log_info2 "SSL certificate is $SSL_SELF_SIGNED" - else - dokku_log_info1 "$APP does not have an SSL endpoint" - fi -} - certs_info_cmd "$@" From f2a4f61920f2a99bdb5d9765e12bad6c9963ec40 Mon Sep 17 00:00:00 2001 From: Omar Shehata Date: Sat, 3 Dec 2016 19:36:11 +0000 Subject: [PATCH 11/68] Added ssh-keys plugin default to list --- plugins/ssh-keys/functions | 7 +++++++ plugins/ssh-keys/subcommands/default | 12 ++++++++++++ plugins/ssh-keys/subcommands/list | 7 ------- 3 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 plugins/ssh-keys/subcommands/default diff --git a/plugins/ssh-keys/functions b/plugins/ssh-keys/functions index 24b5e6807..767f4ae11 100755 --- a/plugins/ssh-keys/functions +++ b/plugins/ssh-keys/functions @@ -2,6 +2,13 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" +list_ssh_keys() { + declare desc="List ssh key hashes" + local cmd="ssh-keys:list" + verify_ssh_key_file + sshcommand list dokku +} + verify_ssh_key_file() { declare desc="Test that public key is valid" [[ -s ${DOKKU_ROOT}/.ssh/authorized_keys ]] || dokku_log_fail "No public keys found." diff --git a/plugins/ssh-keys/subcommands/default b/plugins/ssh-keys/subcommands/default new file mode 100644 index 000000000..abdbaa619 --- /dev/null +++ b/plugins/ssh-keys/subcommands/default @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x +source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" +source "$PLUGIN_AVAILABLE_PATH/ssh-keys/functions" + +ssh_keys_main_cmd() { + declare desc="an alias for ssh-keys:list" + local cmd="ssh-keys" + list_ssh_keys +} + +ssh_keys_main_cmd "$@" \ No newline at end of file diff --git a/plugins/ssh-keys/subcommands/list b/plugins/ssh-keys/subcommands/list index ce485bbd6..fb78c5e2a 100755 --- a/plugins/ssh-keys/subcommands/list +++ b/plugins/ssh-keys/subcommands/list @@ -3,11 +3,4 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" source "$PLUGIN_AVAILABLE_PATH/ssh-keys/functions" -list_ssh_keys() { - declare desc="List ssh key hashes" - local cmd="ssh-keys:list" - verify_ssh_key_file - sshcommand list dokku -} - list_ssh_keys "$@" From 58d774a316020ee96fcadbe9479106dd109152e0 Mon Sep 17 00:00:00 2001 From: Omar Shehata Date: Sat, 3 Dec 2016 19:38:48 +0000 Subject: [PATCH 12/68] Added default for storage plugin to list --- plugins/storage/functions | 10 ++++++++++ plugins/storage/subcommands/default | 13 +++++++++++++ plugins/storage/subcommands/list | 9 --------- 3 files changed, 23 insertions(+), 9 deletions(-) create mode 100644 plugins/storage/subcommands/default diff --git a/plugins/storage/functions b/plugins/storage/functions index 767059f13..d65daeb26 100755 --- a/plugins/storage/functions +++ b/plugins/storage/functions @@ -2,6 +2,16 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" +storage_list_cmd() { + declare desc="List all bound mounts" + local cmd="storage:list" + local passed_phases="deploy" + [[ ! $2 ]] && dokku_log_fail "storage:list requires an app to list." + verify_app_name "$2" && local APP="$2" + echo "$APP volume bind-mounts:" + get_bind_mounts "$(get_phase_file_path "$passed_phases")" +} + verify_paths() { declare desc="verifies storage paths" echo "$1" | grep -qe '^/.*\:/' || dokku_log_fail "Storage path must be two valid paths divided by colon." diff --git a/plugins/storage/subcommands/default b/plugins/storage/subcommands/default new file mode 100644 index 000000000..194ef7942 --- /dev/null +++ b/plugins/storage/subcommands/default @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x +source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" +source "$PLUGIN_CORE_AVAILABLE_PATH/storage/functions" +source "$PLUGIN_CORE_AVAILABLE_PATH/docker-options/functions" + +storage_main_cmd() { + declare desc="an alias for storage:list" + local cmd="storage" + storage_list_cmd "$@" +} + +storage_main_cmd "$@" diff --git a/plugins/storage/subcommands/list b/plugins/storage/subcommands/list index ecaab29b0..a16999a38 100755 --- a/plugins/storage/subcommands/list +++ b/plugins/storage/subcommands/list @@ -4,14 +4,5 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" source "$PLUGIN_CORE_AVAILABLE_PATH/storage/functions" source "$PLUGIN_CORE_AVAILABLE_PATH/docker-options/functions" -storage_list_cmd() { - declare desc="List all bound mounts" - local cmd="storage:list" - local passed_phases="deploy" - [[ ! $2 ]] && dokku_log_fail "storage:list requires an app to list." - verify_app_name "$2" && local APP="$2" - echo "$APP volume bind-mounts:" - get_bind_mounts "$(get_phase_file_path "$passed_phases")" -} storage_list_cmd "$@" From da44c240d79a7344a10d6c0435050b02605ce045 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 4 Dec 2016 15:20:09 -0700 Subject: [PATCH 13/68] Use same check for dockerfile apps during a tar build --- plugins/tar/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/tar/functions b/plugins/tar/functions index 93b024645..a9c8aa049 100755 --- a/plugins/tar/functions +++ b/plugins/tar/functions @@ -24,7 +24,7 @@ tar_build() { tar -x -C "$TAR_BUILD_TMP_WORK_DIR" -f "$DOKKU_ROOT/$APP/src.tar" --strip-components="$BOGUS_PARTS" chmod -R u+r "$TAR_BUILD_TMP_WORK_DIR" - if [[ -f Dockerfile ]] && [[ "$([[ -f .env ]] && grep -q BUILDPACK_URL .env; echo $?)" != "0" ]] && [[ ! -f ".buildpacks" ]]; then + if [[ -f Dockerfile ]] && [[ "$([[ -f .env ]] && grep -q BUILDPACK_URL .env; echo $?)" != "0" ]] && [[ ! -f ".buildpacks" ]] && [[ -z $(config_get "$APP" BUILDPACK_URL || true) ]]; then plugn trigger pre-receive-app "$APP" "dockerfile" "$TAR_BUILD_TMP_WORK_DIR" dokku_receive "$APP" "dockerfile" "$TAR_BUILD_TMP_WORK_DIR" | sed -u "s/^/"$'\e[1G'"/" else From eae3d463df7f7c67279e329e9eef0aa81078b371 Mon Sep 17 00:00:00 2001 From: Turtle Kalus Date: Sun, 4 Dec 2016 18:49:25 -0800 Subject: [PATCH 14/68] Fix for dokku/dokku#2474 `SSL_SERVER_NAME` should contain items found in the ssl certs (E.G. CommonName and AltNames), but not already in the `NOSSL_SERVER_NAME` list. That will avoid the dups in the `nginx.conf` and kill the warning initially cited in dokku/dokku#2474 --- plugins/nginx-vhosts/functions | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/nginx-vhosts/functions b/plugins/nginx-vhosts/functions index 8c88d9a48..c68d9aa66 100755 --- a/plugins/nginx-vhosts/functions +++ b/plugins/nginx-vhosts/functions @@ -272,7 +272,14 @@ nginx_build_config() { else local SSL_VHOSTS=$(< "$DOKKU_ROOT/HOSTNAME") fi - local SSL_SERVER_NAME=$(echo "$SSL_VHOSTS" | xargs) + local SSL_SERVER_NAME + local host + for host in $SSL_VHOSTS; do + # SSL_SERVER_NAME should only contain items not in NOSSL_SERVER_NAME + if [[ ! $NOSSL_SERVER_NAME =~ (^|[[:space:]])$host($|[[:space:]]) ]]; then + SSL_SERVER_NAME="${host}${SSL_SERVER_NAME:+ $SSL_SERVER_NAME}" + fi + done fi local NGINX_VERSION="$(nginx -v 2>&1 | cut -d'/' -f 2)" From 171e9625f652959e90e1485651dd74438f59eeb7 Mon Sep 17 00:00:00 2001 From: Edgars Beigarts Date: Wed, 28 Dec 2016 07:32:19 +0200 Subject: [PATCH 15/68] Fix dokku-installer.service removal --- debian/postrm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/postrm b/debian/postrm index 859fec170..2ddc84de9 100755 --- a/debian/postrm +++ b/debian/postrm @@ -11,13 +11,13 @@ readonly DOKKU_LIB_ROOT="${DOKKU_LIB_PATH:-/var/lib/dokku}" readonly DOKKU_LOGS_DIR="${DOKKU_LOGS_DIR:="/var/log/dokku"}" main() { - if [[ -f /etc/systemd/system/dokku-installer.conf ]] || [[ -f /etc/init/dokku-installer.conf ]]; then + if [[ -f /etc/systemd/system/dokku-installer.service ]] || [[ -f /etc/init/dokku-installer.conf ]]; then service dokku-installer stop || true fi rm -f /etc/init/dokku-installer.conf rm -f /etc/init/dokku-redeploy.conf - rm -f /etc/systemd/system/dokku-installer.conf + rm -f /etc/systemd/system/dokku-installer.service rm -f /etc/systemd/system/dokku-redeploy.service rm -f /etc/update-motd.d/99-dokku From 7af00ef744c80a930f8fca7db6595c42a8917c34 Mon Sep 17 00:00:00 2001 From: Michael Hobbs Date: Tue, 3 Jan 2017 09:36:37 -0800 Subject: [PATCH 16/68] update herokuish to 0.3.29 --- deb.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deb.mk b/deb.mk index f9f9c52ac..ec970000b 100644 --- a/deb.mk +++ b/deb.mk @@ -1,6 +1,6 @@ HEROKUISH_DESCRIPTION = 'Herokuish uses Docker and Buildpacks to build applications like Heroku' HEROKUISH_REPO_NAME ?= gliderlabs/herokuish -HEROKUISH_VERSION ?= 0.3.19 +HEROKUISH_VERSION ?= 0.3.24 HEROKUISH_ARCHITECTURE = amd64 HEROKUISH_PACKAGE_NAME = herokuish_$(HEROKUISH_VERSION)_$(HEROKUISH_ARCHITECTURE).deb From 6c8c4de3981c60948f939897a458267576f095a8 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 8 Jan 2017 05:24:03 -0700 Subject: [PATCH 17/68] feat: skip checking for /etc/os-release On OSX, this file does not exist [ci skip] --- dokku | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dokku b/dokku index b26f6c799..05ae39621 100755 --- a/dokku +++ b/dokku @@ -9,7 +9,7 @@ export DOKKU_ROOT=${DOKKU_ROOT:=~dokku} export DOKKU_DISTRO # shellcheck disable=SC1091 -DOKKU_DISTRO=$(. /etc/os-release && echo "$ID") +DOKKU_DISTRO=$(. /etc/os-release > /dev/null 2>&1 || true ; echo "$ID") export DOKKU_IMAGE=${DOKKU_IMAGE:="gliderlabs/herokuish"} export DOKKU_LIB_ROOT=${DOKKU_LIB_PATH:="/var/lib/dokku"} From f3113296eedca00549fad128d4f415580f4b7cdb Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 8 Jan 2017 05:24:34 -0700 Subject: [PATCH 18/68] fix: ensure man-db is installed when generating man pages [ci skip] --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index fb703f02b..4eeeda230 100644 --- a/Makefile +++ b/Makefile @@ -70,7 +70,7 @@ copyfiles: chown dokku:dokku -R ${PLUGINS_PATH} ${CORE_PLUGINS_PATH} || true $(MAKE) addman -addman: help2man +addman: help2man man-db mkdir -p /usr/local/share/man/man1 help2man -Nh help -v version -n "configure and get information from your dokku installation" -o /usr/local/share/man/man1/dokku.1 dokku mandb From 6ab9e04ba65d4ed31b9a2ce1f7fa858db75b9b13 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 8 Jan 2017 16:41:05 -0700 Subject: [PATCH 19/68] fix: allow overriding both DOKKU_VERSION and GIT_REV via environment variables --- Makefile | 6 +++++- arch.mk | 4 ++++ deb.mk | 8 ++++++++ rpm.mk | 10 +++++++++- 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4eeeda230..64c86a5f3 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -DOKKU_VERSION = master +DOKKU_VERSION ?= master SSHCOMMAND_URL ?= https://raw.githubusercontent.com/dokku/sshcommand/v0.6.0/sshcommand PLUGN_URL ?= https://github.com/dokku/plugn/releases/download/v0.2.2/plugn_0.2.2_linux_x86_64.tgz @@ -76,7 +76,11 @@ addman: help2man man-db mandb version: +ifeq ($(DOKKU_VERSION),master) git describe --tags > ~dokku/VERSION 2> /dev/null || echo '~${DOKKU_VERSION} ($(shell date -uIminutes))' > ~dokku/VERSION +else + echo $(DOKKU_VERSION) > ~dokku/VERSION +endif plugin-dependencies: plugn sudo -E dokku plugin:install-dependencies --core diff --git a/arch.mk b/arch.mk index c9b9159a5..c10f17186 100644 --- a/arch.mk +++ b/arch.mk @@ -22,7 +22,11 @@ arch-setup: arch-dokku: arch-setup echo "-> Update package sums, create metadata file and test the build of the package" +ifeq ($(DOKKU_VERSION),master) git describe --tags > /tmp/VERSION +else + echo $(DOKKU_VERSION) > /tmp/VERSION +endif cat /tmp/VERSION | cut -d '-' -f 1 | cut -d 'v' -f 2 > /tmp/STABLE_VERSION sed -i -e "s/pkgver=.*/pkgver=`cat /tmp/STABLE_VERSION`/" /dokku-arch/PKGBUILD cd /dokku-arch; updpkgsums; mksrcinfo; makepkg -fd diff --git a/deb.mk b/deb.mk index ec970000b..eac9a9ced 100644 --- a/deb.mk +++ b/deb.mk @@ -128,14 +128,22 @@ deb-dokku: cp /usr/local/share/man/man1/dokku.1 /tmp/build/usr/share/man/man1/dokku.1 gzip -9 /tmp/build/usr/share/man/man1/dokku.1 cp contrib/dokku-installer.py /tmp/build/usr/share/dokku/contrib +ifeq ($(DOKKU_VERSION),master) git describe --tags > /tmp/build/var/lib/dokku/VERSION +else + echo $(DOKKU_VERSION) > /tmp/build/var/lib/dokku/VERSION +endif cat /tmp/build/var/lib/dokku/VERSION | cut -d '-' -f 1 | cut -d 'v' -f 2 > /tmp/build/var/lib/dokku/STABLE_VERSION ifneq (,$(findstring false,$(IS_RELEASE))) sed -i.bak -e "s/^/`date +%s`:/" /tmp/build/var/lib/dokku/STABLE_VERSION && rm /tmp/build/var/lib/dokku/STABLE_VERSION.bak endif rm /tmp/build/DEBIAN/lintian-overrides mv debian/lintian-overrides /tmp/build/usr/share/lintian/overrides/dokku +ifdef DOKKU_GIT_REV + echo "$(DOKKU_GIT_REV)" > /tmp/build/var/lib/dokku/GIT_REV +else git rev-parse HEAD > /tmp/build/var/lib/dokku/GIT_REV +endif sed -i "s/^Version: .*/Version: `cat /tmp/build/var/lib/dokku/STABLE_VERSION`/g" /tmp/build/DEBIAN/control dpkg-deb --build /tmp/build "/tmp/dokku_`cat /tmp/build/var/lib/dokku/STABLE_VERSION`_$(DOKKU_ARCHITECTURE).deb" lintian "/tmp/dokku_`cat /tmp/build/var/lib/dokku/STABLE_VERSION`_$(DOKKU_ARCHITECTURE).deb" diff --git a/rpm.mk b/rpm.mk index 1d430a9a3..67d7662d9 100644 --- a/rpm.mk +++ b/rpm.mk @@ -65,12 +65,20 @@ rpm-dokku: cp /usr/local/share/man/man1/dokku.1 /tmp/build/usr/share/man/man1/dokku.1 gzip -9 /tmp/build/usr/share/man/man1/dokku.1 cp contrib/dokku-installer.py /tmp/build/usr/share/dokku/contrib +ifeq ($(DOKKU_VERSION),master) git describe --tags > /tmp/build/var/lib/dokku/VERSION +else + echo $(DOKKU_VERSION) > /tmp/build/var/lib/dokku/VERSION +endif cat /tmp/build/var/lib/dokku/VERSION | cut -d '-' -f 1 | cut -d 'v' -f 2 > /tmp/build/var/lib/dokku/STABLE_VERSION ifneq (,$(findstring false,$(IS_RELEASE))) - sed -i.bak -e "s/^/`date +%s`:/" /tmp/build/var/lib/dokku/STABLE_VERSION && rm /tmp/build/var/lib/dokku/STABLE_VERSION.bak + sed -i.bak -e "s/^/`date +%s`-/" /tmp/build/var/lib/dokku/STABLE_VERSION && rm /tmp/build/var/lib/dokku/STABLE_VERSION.bak endif +ifdef DOKKU_GIT_REV + echo "$(DOKKU_GIT_REV)" > /tmp/build/var/lib/dokku/GIT_REV +else git rev-parse HEAD > /tmp/build/var/lib/dokku/GIT_REV +endif @echo "-> Creating rpm package" VERSION=$$(cat /tmp/build/var/lib/dokku/STABLE_VERSION); \ From e46b0952e27338be9433e227d5f07f6d90752d9b Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 8 Jan 2017 16:49:32 -0700 Subject: [PATCH 20/68] feat: add release-related Dockerfiles These two docker files are used to create deb and rpm packages which are later extracted and pushed to packagecloud. [ci skip] --- .dockerignore | 8 ++++++++ contrib/build-centos.Dockerfile | 34 +++++++++++++++++++++++++++++++++ contrib/build-ubuntu.Dockerfile | 34 +++++++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+) create mode 100644 .dockerignore create mode 100644 contrib/build-centos.Dockerfile create mode 100644 contrib/build-ubuntu.Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..0ef019adc --- /dev/null +++ b/.dockerignore @@ -0,0 +1,8 @@ +*Dockerfile +.dockerignore +.git +.vagrant +contrib +docs +tests +!contrib/dokku-installer.py diff --git a/contrib/build-centos.Dockerfile b/contrib/build-centos.Dockerfile new file mode 100644 index 000000000..95473c10d --- /dev/null +++ b/contrib/build-centos.Dockerfile @@ -0,0 +1,34 @@ +FROM ubuntu:14.04 + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update + +RUN apt-get -qq -y install gcc git build-essential wget ruby-dev ruby1.9.1 lintian rpm help2man man-db + +RUN command -v fpm > /dev/null || sudo gem install fpm --no-ri --no-rdoc + +WORKDIR /dokku + +COPY Makefile /dokku/ + +COPY *.mk /dokku/ + +RUN make deb-setup rpm-setup + +COPY . /dokku + +RUN make sshcommand plugn version copyfiles + +ARG DOKKU_VERSION=master +ENV DOKKU_VERSION ${DOKKU_VERSION} + +ARG DOKKU_GIT_REV +ENV DOKKU_GIT_REV ${DOKKU_GIT_REV} + +ARG IS_RELEASE=false +ENV IS_RELEASE ${IS_RELEASE} + +RUN make rpm-herokuish rpm-dokku rpm-plugn rpm-sshcommand rpm-sigil + +RUN mkdir -p /data && cp /tmp/*.rpm /data && ls /data/ diff --git a/contrib/build-ubuntu.Dockerfile b/contrib/build-ubuntu.Dockerfile new file mode 100644 index 000000000..a5c9892cb --- /dev/null +++ b/contrib/build-ubuntu.Dockerfile @@ -0,0 +1,34 @@ +FROM ubuntu:14.04 + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update + +RUN apt-get -qq -y install gcc git build-essential wget ruby-dev ruby1.9.1 lintian rpm help2man man-db + +RUN command -v fpm > /dev/null || sudo gem install fpm --no-ri --no-rdoc + +WORKDIR /dokku + +COPY Makefile /dokku/ + +COPY *.mk /dokku/ + +RUN make deb-setup rpm-setup + +COPY . /dokku + +RUN make sshcommand plugn version copyfiles + +ARG DOKKU_VERSION=master +ENV DOKKU_VERSION ${DOKKU_VERSION} + +ARG DOKKU_GIT_REV +ENV DOKKU_GIT_REV ${DOKKU_GIT_REV} + +ARG IS_RELEASE=false +ENV IS_RELEASE ${IS_RELEASE} + +RUN make deb-herokuish deb-dokku deb-plugn deb-sshcommand deb-sigil + +RUN mkdir -p /data && cp /tmp/*.deb /data && ls /data/ From 87573b81bbeb8ec6eb3d408926656fdf0f9cc1ca Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 8 Jan 2017 17:22:30 -0700 Subject: [PATCH 21/68] Release 0.8.0 --- HISTORY.md | 62 ++++++++++++++++++++++++ README.md | 4 +- contrib/dokku-installer.py | 2 +- debian/control | 2 +- docs/advanced-usage/plugin-management.md | 48 +++++++++--------- docs/assets/favicons/browserconfig.xml | 8 +-- docs/assets/favicons/manifest.json | 12 ++--- docs/assets/style.css | 4 +- docs/assets/versions.json | 11 ++++- docs/development/release-process.md | 2 +- docs/getting-started/installation.md | 4 +- docs/home.html | 42 ++++++++-------- docs/template.html | 36 +++++++------- plugins/00_dokku-standard/plugin.toml | 2 +- plugins/20_events/plugin.toml | 2 +- plugins/apps/plugin.toml | 2 +- plugins/build-env/plugin.toml | 2 +- plugins/certs/plugin.toml | 2 +- plugins/checks/plugin.toml | 2 +- plugins/common/plugin.toml | 2 +- plugins/config/plugin.toml | 2 +- plugins/docker-options/plugin.toml | 2 +- plugins/domains/plugin.toml | 2 +- plugins/enter/plugin.toml | 2 +- plugins/git/plugin.toml | 2 +- plugins/logs/plugin.toml | 2 +- plugins/named-containers/plugin.toml | 2 +- plugins/nginx-vhosts/plugin.toml | 2 +- plugins/plugin/plugin.toml | 2 +- plugins/proxy/plugin.toml | 2 +- plugins/ps/plugin.toml | 2 +- plugins/repo/plugin.toml | 2 +- plugins/shell/plugin.toml | 2 +- plugins/ssh-keys/plugin.toml | 2 +- plugins/storage/plugin.toml | 2 +- plugins/tags/plugin.toml | 2 +- plugins/tar/plugin.toml | 2 +- 37 files changed, 178 insertions(+), 107 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 601a8ac7f..e49a57fe3 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,67 @@ # History +## 0.8.0 + +The big kahuna. Lots of documentation changes, and a few bug fixes to make Dokku development a bit easier. + +CentOS 7 users will be happy to see that we now have experimental support for your operating system. Huge thanks to @ebeigarts for working on that feature :) + +Thanks to all the contributors who helped with this release! + +### Bug Fixes + +- #2407: @josegonzalez Move core post-deploy triggers to core-post-deploy +- #2442: @znz Fix `is_tag_force_available` bug when docker major version up +- #2452: @mbtamuli Solves SSH Key problem when admin user already exists +- #2454: @onbjerg Return exit 1 in config:get if no ENV file exists +- #2464: @sseemayer Remove duplicate SSL hostnames +- #2465: @polettix Fix issue when importing ssh-keys +- #2477: @ebeigarts Fix dokku-redeploy systemd script to start only after docker +- #2485: @znz Fix bug when VHOST file is missing newline +- #2492: @josegonzalez Fix iteration on all apps for `dokku proxy` command +- #2495: @josegonzalez Create the user's `authorized_keys` file if it does not exist +- #2496: @josegonzalez Detect nginx versions that support HTTP/2 well +- #2518: @josegonzalez Use same check for dockerfile apps during a tar build +- #2526: @michaelshobbs Actually fail deploy when app.json script fails +- #2539: @ebeigarts Fix dokku-installer.service removal + +### New Features + +- #2378: @knjcode Skip container finish processing when zero downtime is disabled +- #2406: @josegonzalez Use apps_create method when renaming an application +- #2419: @ebeigarts Support for CentOS 7 +- #2489: @joshmanders Add plugin uninstall trigger +- #2510: @IlyaSemenov Add domains:set and domains:set-global commands +- #2544: @michaelshobbs Update herokuish to 0.3.24 +- #2552: @josegonzalez Allow package building on OSX +- #2553: @josegonzalez Add release-related Dockerfiles + +### Documentation + +- #2432: @josegonzalez Clarify DOKKU_SCALE docs +- #2433: @alexgleason Add robots.txt plugin to community docs +- #2437: @vishnubhagwan Fix warning in installation docs +- #2451: @mbtamuli Document the logs plugin +- #2470: @fteychene Add build-hook to plugins doc +- #2472: @mainto Add dokku-access to plugins doc +- #2484: @nahtnam Document build issues when a `Killed` message is displayed +- #2486: @OmarShehata Fixing typo & broken link in docs +- #2488: @joshmanders Bump font size in documentation +- #2493: @josegonzalez Clarify checks documentation +- #2497: @joshmanders Make features heading more clear +- #2503: @mlebkowski Update dokku-acl plugin link +- #2505: @kjschulz Add Dokku Wordpress plugin to docs +- #2506: @simonkotwicz Fix typos in deployment docs +- #2507: @josegonzalez Update upgrade docs to point out sshcommand and plugn upgrading as well +- #2509: @kjschulz Map dokku-community user in plugins +- #2511: @IlyaSemenov Clarify instructions for arranging default nginx site +- #2515: @sgloutnikov Update DreamHost Cloud install instructions +- #2517: @josegonzalez Update docs regarding if the ssh-keys plugin should be in use +- #2522: @joshmanders Ensure install documentation can be run via copy-paste +- #2525: @OmarShehata Plugin-triggers typo: dokkku -> dokku +- #2531: @slava-vishnyakov Document rebuilding app after mounting storage +- #2533: @facundomedica Document potential firewall problem on Ubuntu 16.04 + ## 0.7.2 This minor release contains mostly documentation changes, and should be fully backwards compatible with previous 0.7.x releases. diff --git a/README.md b/README.md index 5a31bd058..c6febc908 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,8 @@ Docker powered mini-Heroku. The smallest PaaS implementation you've ever seen. To install the latest stable release, you can run the following commands as a user that has access to `sudo`: - wget https://raw.githubusercontent.com/dokku/dokku/v0.7.2/bootstrap.sh; - sudo DOKKU_TAG=v0.7.2 bash bootstrap.sh + wget https://raw.githubusercontent.com/dokku/dokku/v0.8.0/bootstrap.sh; + sudo DOKKU_TAG=v0.8.0 bash bootstrap.sh You can then proceed to the ip address or domain name associated with your server to complete the web-based installation. diff --git a/contrib/dokku-installer.py b/contrib/dokku-installer.py index 9c897fc70..67380722f 100755 --- a/contrib/dokku-installer.py +++ b/contrib/dokku-installer.py @@ -10,7 +10,7 @@ import subprocess import sys import threading -VERSION = 'v0.7.2' +VERSION = 'v0.8.0' hostname = '' try: diff --git a/debian/control b/debian/control index f8c628bb2..d88270c1a 100644 --- a/debian/control +++ b/debian/control @@ -1,5 +1,5 @@ Package: dokku -Version: 0.7.2 +Version: 0.8.0 Section: web Priority: optional Architecture: amd64 diff --git a/docs/advanced-usage/plugin-management.md b/docs/advanced-usage/plugin-management.md index 01af0b16b..3ac658310 100644 --- a/docs/advanced-usage/plugin-management.md +++ b/docs/advanced-usage/plugin-management.md @@ -31,30 +31,30 @@ dokku plugin ``` plugn: dev - 00_dokku-standard 0.7.2 enabled dokku core standard plugin - 20_events 0.7.2 enabled dokku core events logging plugin - apps 0.7.2 enabled dokku core apps plugin - build-env 0.7.2 enabled dokku core build-env plugin - certs 0.7.2 enabled dokku core certificate management plugin - checks 0.7.2 enabled dokku core checks plugin - common 0.7.2 enabled dokku core common plugin - config 0.7.2 enabled dokku core config plugin - docker-options 0.7.2 enabled dokku core docker-options plugin - domains 0.7.2 enabled dokku core domains plugin - enter 0.7.2 enabled dokku core enter plugin - git 0.7.2 enabled dokku core git plugin - logs 0.7.2 enabled dokku core logs plugin - named-containers 0.7.2 enabled dokku core named containers plugin - nginx-vhosts 0.7.2 enabled dokku core nginx-vhosts plugin - plugin 0.7.2 enabled dokku core plugin plugin - proxy 0.7.2 enabled dokku core proxy plugin - ps 0.7.2 enabled dokku core ps plugin - repo 0.7.2 enabled dokku core repo plugin - shell 0.7.2 enabled dokku core shell plugin - ssh-keys 0.7.2 enabled dokku core ssh-keys plugin - storage 0.7.2 enabled dokku core storage plugin - tags 0.7.2 enabled dokku core tags plugin - tar 0.7.2 enabled dokku core tar plugin + 00_dokku-standard 0.8.0 enabled dokku core standard plugin + 20_events 0.8.0 enabled dokku core events logging plugin + apps 0.8.0 enabled dokku core apps plugin + build-env 0.8.0 enabled dokku core build-env plugin + certs 0.8.0 enabled dokku core certificate management plugin + checks 0.8.0 enabled dokku core checks plugin + common 0.8.0 enabled dokku core common plugin + config 0.8.0 enabled dokku core config plugin + docker-options 0.8.0 enabled dokku core docker-options plugin + domains 0.8.0 enabled dokku core domains plugin + enter 0.8.0 enabled dokku core enter plugin + git 0.8.0 enabled dokku core git plugin + logs 0.8.0 enabled dokku core logs plugin + named-containers 0.8.0 enabled dokku core named containers plugin + nginx-vhosts 0.8.0 enabled dokku core nginx-vhosts plugin + plugin 0.8.0 enabled dokku core plugin plugin + proxy 0.8.0 enabled dokku core proxy plugin + ps 0.8.0 enabled dokku core ps plugin + repo 0.8.0 enabled dokku core repo plugin + shell 0.8.0 enabled dokku core shell plugin + ssh-keys 0.8.0 enabled dokku core ssh-keys plugin + storage 0.8.0 enabled dokku core storage plugin + tags 0.8.0 enabled dokku core tags plugin + tar 0.8.0 enabled dokku core tar plugin ``` Installing a plugin is easy as well using the `plugin:install` command. This command will also trigger the `install` pluginhook on all existing plugins. diff --git a/docs/assets/favicons/browserconfig.xml b/docs/assets/favicons/browserconfig.xml index 1881ad8c8..14e9c8e67 100644 --- a/docs/assets/favicons/browserconfig.xml +++ b/docs/assets/favicons/browserconfig.xml @@ -2,10 +2,10 @@ - - - - + + + + #da532c diff --git a/docs/assets/favicons/manifest.json b/docs/assets/favicons/manifest.json index a3d6a7458..1bc480147 100644 --- a/docs/assets/favicons/manifest.json +++ b/docs/assets/favicons/manifest.json @@ -2,37 +2,37 @@ "name": "Dokku", "icons": [ { - "src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.7.2\/docs\/assets\/favicons\/android-chrome-36x36.png", + "src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.8.0\/docs\/assets\/favicons\/android-chrome-36x36.png", "sizes": "36x36", "type": "image\/png", "density": "0.75" }, { - "src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.7.2\/docs\/assets\/favicons\/android-chrome-48x48.png", + "src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.8.0\/docs\/assets\/favicons\/android-chrome-48x48.png", "sizes": "48x48", "type": "image\/png", "density": "1.0" }, { - "src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.7.2\/docs\/assets\/favicons\/android-chrome-72x72.png", + "src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.8.0\/docs\/assets\/favicons\/android-chrome-72x72.png", "sizes": "72x72", "type": "image\/png", "density": "1.5" }, { - "src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.7.2\/docs\/assets\/favicons\/android-chrome-96x96.png", + "src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.8.0\/docs\/assets\/favicons\/android-chrome-96x96.png", "sizes": "96x96", "type": "image\/png", "density": "2.0" }, { - "src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.7.2\/docs\/assets\/favicons\/android-chrome-144x144.png", + "src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.8.0\/docs\/assets\/favicons\/android-chrome-144x144.png", "sizes": "144x144", "type": "image\/png", "density": "3.0" }, { - "src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.7.2\/docs\/assets\/favicons\/android-chrome-192x192.png", + "src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.8.0\/docs\/assets\/favicons\/android-chrome-192x192.png", "sizes": "192x192", "type": "image\/png", "density": "4.0" diff --git a/docs/assets/style.css b/docs/assets/style.css index da3c92f26..6377af5ef 100644 --- a/docs/assets/style.css +++ b/docs/assets/style.css @@ -35,13 +35,13 @@ h1 { background-repeat: no-repeat; } .header .navbar-brand a { - background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.7.2/docs/assets/dokku.png); + background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.8.0/docs/assets/dokku.png); text-indent: 40px; } .blurb { color: #424242; background-color: #ededed; - background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.7.2/docs/assets/gplaypattern.png); + background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.8.0/docs/assets/gplaypattern.png); padding: 45px 0; text-align: center; } diff --git a/docs/assets/versions.json b/docs/assets/versions.json index 32140569b..eb62acaf0 100644 --- a/docs/assets/versions.json +++ b/docs/assets/versions.json @@ -1 +1,10 @@ -{ "max-versions": [ "0.3.26", "0.4.14", "0.5.8", "0.6.5", "0.7.2" ] } +{ + "max-versions": [ + "0.3.26", + "0.4.14", + "0.5.8", + "0.6.5", + "0.7.2", + "0.8.0" + ] +} diff --git a/docs/development/release-process.md b/docs/development/release-process.md index c8efc1347..52a81cb8b 100644 --- a/docs/development/release-process.md +++ b/docs/development/release-process.md @@ -67,7 +67,7 @@ The workflow looks like this: ```shell # having dokku-arch in ../dokku-arch vagrant up build-arch -# wait for "==> build-arch: ==> Finished making: dokku 0.7.2-2 (Mon Feb 22 23:20:37 CET 2016)" +# wait for "==> build-arch: ==> Finished making: dokku 0.8.0-2 (Mon Feb 22 23:20:37 CET 2016)" cd ../dokku-arch git add PKGBUILD .SRCINFO git commit -m 'Update to dokku 0.9.9' diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index d3715a566..6e0358d2e 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -21,8 +21,8 @@ To install the latest stable version of dokku, you can run the following shell c ```shell # for debian systems, installs Dokku via apt-get -wget https://raw.githubusercontent.com/dokku/dokku/v0.7.2/bootstrap.sh; -sudo DOKKU_TAG=v0.7.2 bash bootstrap.sh +wget https://raw.githubusercontent.com/dokku/dokku/v0.8.0/bootstrap.sh; +sudo DOKKU_TAG=v0.8.0 bash bootstrap.sh ``` The installation process takes about 5-10 minutes, depending upon internet connection speed. diff --git a/docs/home.html b/docs/home.html index 402a9e9b8..f8f0c65f9 100644 --- a/docs/home.html +++ b/docs/home.html @@ -7,33 +7,33 @@ - + Dokku - The smallest PaaS implementation you've ever seen - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - + + - + @@ -98,12 +98,12 @@

$ - wget https://raw.githubusercontent.com/dokku/dokku/v0.7.2/bootstrap.sh + wget https://raw.githubusercontent.com/dokku/dokku/v0.8.0/bootstrap.sh

$ - sudo DOKKU_TAG=v0.7.2 bash bootstrap.sh + sudo DOKKU_TAG=v0.8.0 bash bootstrap.sh

 # go to your server's IP and follow the web installer diff --git a/docs/template.html b/docs/template.html index 7c69c23c8..4676c64a2 100644 --- a/docs/template.html +++ b/docs/template.html @@ -10,26 +10,26 @@ Dokku - The smallest PaaS implementation you've ever seen - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - + + - + From 0e0012cca1a3248770feb8b1755418883d350c65 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 8 Jan 2017 21:43:37 -0700 Subject: [PATCH 28/68] fix: remove extra closing tag --- docs/template.html | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/template.html b/docs/template.html index b765039a8..1fd721650 100644 --- a/docs/template.html +++ b/docs/template.html @@ -7,7 +7,6 @@ -> Dokku - The smallest PaaS implementation you've ever seen From 13ef76127de8950487dbc26bb93f5cd09de9ac57 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Fri, 25 Nov 2016 01:15:44 -0700 Subject: [PATCH 29/68] Suppress output unless the `git submodule update` call fails This will give a bit more warning to developers as to what might be going on, allowing them to respond appropriately. Closes #2479 --- plugins/git/functions | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/plugins/git/functions b/plugins/git/functions index 33158d646..dd6ac32a2 100755 --- a/plugins/git/functions +++ b/plugins/git/functions @@ -28,7 +28,7 @@ git_build_app_repo() { git remote add origin "$DOKKU_ROOT/$APP" &> /dev/null git fetch --depth=1 origin "refs/tags/$TMP_TAG" &> /dev/null git reset --hard FETCH_HEAD &> /dev/null - git submodule update --init --recursive &> /dev/null + suppress_output git submodule update --init --recursive GIT_DIR="$DOKKU_ROOT/$APP" git tag -d "$TMP_TAG" &> /dev/null || true find -name .git -prune -exec rm -rf {} \; > /dev/null @@ -41,6 +41,21 @@ git_build_app_repo() { fi } +suppress_output() { + declare desc="suppress all output from a given command unless there is an error" + local TMP_COMMAND_OUTPUT + TMP_COMMAND_OUTPUT=$(mktemp "/tmp/${FUNCNAME[0]}.XXXX") + trap 'rm -rf "$TMP_COMMAND_OUTPUT" > /dev/null' RETURN INT TERM EXIT + + $* 2>&1 > "$TMP_COMMAND_OUTPUT" || { + local exit_code="$?" + cat "$TMP_COMMAND_OUTPUT" + return "$exit_code" + } + return 0 +} + + git_hook_cmd() { declare desc="kick off receive-app trigger from git prereceive hook" local cmd="git-hook" From b23c6020794ca016a3e01f7095d3e6c283e9b686 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 9 Jan 2017 00:36:35 -0700 Subject: [PATCH 30/68] chore: remove extra whitespace in client [ci skip] --- contrib/dokku_client.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/dokku_client.sh b/contrib/dokku_client.sh index 6ed95a804..855f76ea5 100755 --- a/contrib/dokku_client.sh +++ b/contrib/dokku_client.sh @@ -34,11 +34,11 @@ client_help_msg() { } is_git_repo() { - git rev-parse &>/dev/null + git rev-parse &>/dev/null } has_dokku_remote() { - git remote show | grep dokku + git remote show | grep dokku } if [[ -z $DOKKU_HOST ]]; then From 332c429e31d9ee52ffc23ecb1c6495f5136b184d Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 9 Jan 2017 00:37:54 -0700 Subject: [PATCH 31/68] refactor: make variables local and move them into correct functions --- contrib/dokku_client.sh | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/contrib/dokku_client.sh b/contrib/dokku_client.sh index 855f76ea5..0584912d1 100755 --- a/contrib/dokku_client.sh +++ b/contrib/dokku_client.sh @@ -1,9 +1,6 @@ #!/usr/bin/env bash set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -MOVES=(ABLE ABNORMA AGAIN AIREXPL ANG ANGER ASAIL ATTACK AURORA AWL BAN BAND BARE BEAT BEATED BELLY BIND BITE BLOC BLOOD BODY BOOK BREATH BUMP CAST CHAM CLAMP CLAP CLAW CLEAR CLI CLIP CLOUD CONTRO CONVY COOLHIT CRASH CRY CUT DESCRI D-FIGHT DIG DITCH DIV DOZ DRE DUL DU-PIN DYE EARTH EDU EG-BOMB EGG ELEGY ELE-HIT EMBODY EMPLI ENGL ERUPT EVENS EXPLOR EYES FALL FAST F-CAR F-DANCE FEARS F-FIGHT FIGHT FIR FIRE FIREHIT FLAME FLAP FLASH FLEW FORCE FRA FREEZE FROG G-BIRD GENKISS GIFT G-KISS G-MOUSE GRADE GROW HAMMER HARD HAT HATE H-BOMB HELL-R HEMP HINT HIT HU HUNT HYPNOSI INHA IRO IRONBAR IR-WING J-GUN KEE KICK KNIF KNIFE KNOCK LEVEL LIGH LIGHHIT LIGHT LIVE L-WALL MAD MAJUS MEL MELO MESS MILK MIMI MISS MIXING MOVE MUD NI-BED NOISY NOONLI NULL N-WAVE PAT PEACE PIN PLAN PLANE POIS POL POWDE POWE POWER PRIZE PROTECT PROUD RAGE RECOR REFLAC REFREC REGR RELIV RENEW R-FIGHT RING RKICK ROCK ROUND RUS RUSH SAND SAW SCISSOR SCRA SCRIPT SEEN SERVER SHADOW SHELL SHINE SHO SIGHT SIN SMALL SMELT SMOK SNAKE SNO SNOW SOU SO-WAVE SPAR SPEC SPID S-PIN SPRA STAM STARE STEA STONE STORM STRU STRUG STUDEN SUBS SUCID SUN-LIG SUNRIS SUPLY S-WAVE TAILS TANGL TASTE TELLI THANK TONKICK TOOTH TORL TRAIN TRIKICK TUNGE VOLT WA-GUN WATCH WAVE W-BOMB WFALL WFING WHIP WHIRL WIND WOLF WOOD WOR YUJA) -NAMES=(SEED GRASS FLOWE SHAD CABR SNAKE GOLD COW GUIKI PEDAL DELAN B-FLY BIDE KEYU FORK LAP PIGE PIJIA CAML LAT BIRD BABOO VIV ABOKE PIKAQ RYE SAN BREAD LIDEL LIDE PIP PIKEX ROK JUGEN PUD BUDE ZHIB GELU GRAS FLOW LAFUL ATH BALA CORN MOLUF DESP DAKED MIMI BOLUX KODA GELUD MONK SUMOY GEDI WENDI NILEM NILE NILEC KEZI YONGL HUDE WANLI GELI GUAIL MADAQ WUCI WUCI MUJEF JELLY SICIB GELU NELUO BOLI JIALE YED YEDE CLO SCARE AOCO DEDE DEDEI BAWU JIUG BADEB BADEB HOLE BALUX GES FANT QUAR YIHE SWAB SLIPP CLU DEPOS BILIY YUANO SOME NO YELA EMPT ZECUN XIAHE BOLEL DEJI MACID XIHON XITO LUCK MENJI GELU DECI XIDE DASAJ DONGN RICUL MINXI BALIY ZENDA LUZEL HELE5 0FENB KAIL JIAND CARP JINDE LAPU MUDE YIFU LINLI SANDI HUSI JINC OUMU OUMUX CAP KUIZA PUD TIAO FRMAN CLAU SPARK DRAGO BOLIU GUAIL MIYOU MIY QIAOK BEIL MUKEI RIDED MADAM BAGEP CROC ALIGE OUDAL OUD DADA HEHE YEDEA NUXI NUXIN ROUY ALIAD STICK QIANG LAAND PIQI PI PUPI DEKE DEKEJ NADI NADIO MALI PEA ELECT FLOWE MAL MALI HUSHU NILEE YUZI POPOZ DUZI HEBA XIAN SHAN YEYEA WUY LUO KEFE HULA CROW YADEH MOW ANNAN SUONI KYLI HULU HUDEL YEHE GULAE YEHE BLU GELAN BOAT NIP POIT HELAK XINL BEAR LINB MAGEH MAGEJ WULI YIDE RIVE FISH AOGU DELIE MANTE KONMU DELU HELU HUAN HUMA DONGF JINCA HEDE DEFU LIBY JIAPA MEJI HELE BUHU MILK HABI THUN GARD DON YANGQ SANAQ BANQ LUJ PHIX SIEI EGG) - random_number() { [[ -n "$1" ]] && RANGE="$1" if [[ -n "$RANGE" ]]; then @@ -16,15 +13,19 @@ random_number() { } random_name() { - NUM1=$(random_number ${#MOVES[@]}) - NUM2=$(random_number ${#MOVES[@]}) - NUM3=$(random_number ${#NAMES[@]}) + local NUM1 NUM2 NUM3 UPPER_APPNAME lower_appname + local MOVES=(ABLE ABNORMA AGAIN AIREXPL ANG ANGER ASAIL ATTACK AURORA AWL BAN BAND BARE BEAT BEATED BELLY BIND BITE BLOC BLOOD BODY BOOK BREATH BUMP CAST CHAM CLAMP CLAP CLAW CLEAR CLI CLIP CLOUD CONTRO CONVY COOLHIT CRASH CRY CUT DESCRI D-FIGHT DIG DITCH DIV DOZ DRE DUL DU-PIN DYE EARTH EDU EG-BOMB EGG ELEGY ELE-HIT EMBODY EMPLI ENGL ERUPT EVENS EXPLOR EYES FALL FAST F-CAR F-DANCE FEARS F-FIGHT FIGHT FIR FIRE FIREHIT FLAME FLAP FLASH FLEW FORCE FRA FREEZE FROG G-BIRD GENKISS GIFT G-KISS G-MOUSE GRADE GROW HAMMER HARD HAT HATE H-BOMB HELL-R HEMP HINT HIT HU HUNT HYPNOSI INHA IRO IRONBAR IR-WING J-GUN KEE KICK KNIF KNIFE KNOCK LEVEL LIGH LIGHHIT LIGHT LIVE L-WALL MAD MAJUS MEL MELO MESS MILK MIMI MISS MIXING MOVE MUD NI-BED NOISY NOONLI NULL N-WAVE PAT PEACE PIN PLAN PLANE POIS POL POWDE POWE POWER PRIZE PROTECT PROUD RAGE RECOR REFLAC REFREC REGR RELIV RENEW R-FIGHT RING RKICK ROCK ROUND RUS RUSH SAND SAW SCISSOR SCRA SCRIPT SEEN SERVER SHADOW SHELL SHINE SHO SIGHT SIN SMALL SMELT SMOK SNAKE SNO SNOW SOU SO-WAVE SPAR SPEC SPID S-PIN SPRA STAM STARE STEA STONE STORM STRU STRUG STUDEN SUBS SUCID SUN-LIG SUNRIS SUPLY S-WAVE TAILS TANGL TASTE TELLI THANK TONKICK TOOTH TORL TRAIN TRIKICK TUNGE VOLT WA-GUN WATCH WAVE W-BOMB WFALL WFING WHIP WHIRL WIND WOLF WOOD WOR YUJA) + local NAMES=(SEED GRASS FLOWE SHAD CABR SNAKE GOLD COW GUIKI PEDAL DELAN B-FLY BIDE KEYU FORK LAP PIGE PIJIA CAML LAT BIRD BABOO VIV ABOKE PIKAQ RYE SAN BREAD LIDEL LIDE PIP PIKEX ROK JUGEN PUD BUDE ZHIB GELU GRAS FLOW LAFUL ATH BALA CORN MOLUF DESP DAKED MIMI BOLUX KODA GELUD MONK SUMOY GEDI WENDI NILEM NILE NILEC KEZI YONGL HUDE WANLI GELI GUAIL MADAQ WUCI WUCI MUJEF JELLY SICIB GELU NELUO BOLI JIALE YED YEDE CLO SCARE AOCO DEDE DEDEI BAWU JIUG BADEB BADEB HOLE BALUX GES FANT QUAR YIHE SWAB SLIPP CLU DEPOS BILIY YUANO SOME NO YELA EMPT ZECUN XIAHE BOLEL DEJI MACID XIHON XITO LUCK MENJI GELU DECI XIDE DASAJ DONGN RICUL MINXI BALIY ZENDA LUZEL HELE5 0FENB KAIL JIAND CARP JINDE LAPU MUDE YIFU LINLI SANDI HUSI JINC OUMU OUMUX CAP KUIZA PUD TIAO FRMAN CLAU SPARK DRAGO BOLIU GUAIL MIYOU MIY QIAOK BEIL MUKEI RIDED MADAM BAGEP CROC ALIGE OUDAL OUD DADA HEHE YEDEA NUXI NUXIN ROUY ALIAD STICK QIANG LAAND PIQI PI PUPI DEKE DEKEJ NADI NADIO MALI PEA ELECT FLOWE MAL MALI HUSHU NILEE YUZI POPOZ DUZI HEBA XIAN SHAN YEYEA WUY LUO KEFE HULA CROW YADEH MOW ANNAN SUONI KYLI HULU HUDEL YEHE GULAE YEHE BLU GELAN BOAT NIP POIT HELAK XINL BEAR LINB MAGEH MAGEJ WULI YIDE RIVE FISH AOGU DELIE MANTE KONMU DELU HELU HUAN HUMA DONGF JINCA HEDE DEFU LIBY JIAPA MEJI HELE BUHU MILK HABI THUN GARD DON YANGQ SANAQ BANQ LUJ PHIX SIEI EGG) - UPPER_APPNAME="${MOVES[${NUM1}]}-${MOVES[${NUM2}]}-${NAMES[${NUM3}]}" + NUM1=$(random_number ${#MOVES[@]}) + NUM2=$(random_number ${#MOVES[@]}) + NUM3=$(random_number ${#NAMES[@]}) - [[ "$BASH_VERSION" =~ 4.* ]] && lower_appname=${UPPER_APPNAME,,} - [[ -z "$lower_appname" ]] && lower_appname=$(echo "$UPPER_APPNAME" | tr '[:upper:]' '[:lower:]') - echo "$lower_appname" + UPPER_APPNAME="${MOVES[${NUM1}]}-${MOVES[${NUM2}]}-${NAMES[${NUM3}]}" + + [[ "$BASH_VERSION" =~ 4.* ]] && lower_appname=${UPPER_APPNAME,,} + [[ -z "$lower_appname" ]] && lower_appname=$(echo "$UPPER_APPNAME" | tr '[:upper:]' '[:lower:]') + echo "$lower_appname" } client_help_msg() { From 70f3e3407f2b46d47c7f5e12fbdedaae286029d4 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 9 Jan 2017 00:44:13 -0700 Subject: [PATCH 32/68] chore: prefix functions with fn- --- contrib/dokku_client.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/contrib/dokku_client.sh b/contrib/dokku_client.sh index 0584912d1..5b0f8ada5 100755 --- a/contrib/dokku_client.sh +++ b/contrib/dokku_client.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -random_number() { +fn-random-number() { [[ -n "$1" ]] && RANGE="$1" if [[ -n "$RANGE" ]]; then number=$RANDOM @@ -12,14 +12,14 @@ random_number() { echo $number } -random_name() { +fn-random-name() { local NUM1 NUM2 NUM3 UPPER_APPNAME lower_appname local MOVES=(ABLE ABNORMA AGAIN AIREXPL ANG ANGER ASAIL ATTACK AURORA AWL BAN BAND BARE BEAT BEATED BELLY BIND BITE BLOC BLOOD BODY BOOK BREATH BUMP CAST CHAM CLAMP CLAP CLAW CLEAR CLI CLIP CLOUD CONTRO CONVY COOLHIT CRASH CRY CUT DESCRI D-FIGHT DIG DITCH DIV DOZ DRE DUL DU-PIN DYE EARTH EDU EG-BOMB EGG ELEGY ELE-HIT EMBODY EMPLI ENGL ERUPT EVENS EXPLOR EYES FALL FAST F-CAR F-DANCE FEARS F-FIGHT FIGHT FIR FIRE FIREHIT FLAME FLAP FLASH FLEW FORCE FRA FREEZE FROG G-BIRD GENKISS GIFT G-KISS G-MOUSE GRADE GROW HAMMER HARD HAT HATE H-BOMB HELL-R HEMP HINT HIT HU HUNT HYPNOSI INHA IRO IRONBAR IR-WING J-GUN KEE KICK KNIF KNIFE KNOCK LEVEL LIGH LIGHHIT LIGHT LIVE L-WALL MAD MAJUS MEL MELO MESS MILK MIMI MISS MIXING MOVE MUD NI-BED NOISY NOONLI NULL N-WAVE PAT PEACE PIN PLAN PLANE POIS POL POWDE POWE POWER PRIZE PROTECT PROUD RAGE RECOR REFLAC REFREC REGR RELIV RENEW R-FIGHT RING RKICK ROCK ROUND RUS RUSH SAND SAW SCISSOR SCRA SCRIPT SEEN SERVER SHADOW SHELL SHINE SHO SIGHT SIN SMALL SMELT SMOK SNAKE SNO SNOW SOU SO-WAVE SPAR SPEC SPID S-PIN SPRA STAM STARE STEA STONE STORM STRU STRUG STUDEN SUBS SUCID SUN-LIG SUNRIS SUPLY S-WAVE TAILS TANGL TASTE TELLI THANK TONKICK TOOTH TORL TRAIN TRIKICK TUNGE VOLT WA-GUN WATCH WAVE W-BOMB WFALL WFING WHIP WHIRL WIND WOLF WOOD WOR YUJA) local NAMES=(SEED GRASS FLOWE SHAD CABR SNAKE GOLD COW GUIKI PEDAL DELAN B-FLY BIDE KEYU FORK LAP PIGE PIJIA CAML LAT BIRD BABOO VIV ABOKE PIKAQ RYE SAN BREAD LIDEL LIDE PIP PIKEX ROK JUGEN PUD BUDE ZHIB GELU GRAS FLOW LAFUL ATH BALA CORN MOLUF DESP DAKED MIMI BOLUX KODA GELUD MONK SUMOY GEDI WENDI NILEM NILE NILEC KEZI YONGL HUDE WANLI GELI GUAIL MADAQ WUCI WUCI MUJEF JELLY SICIB GELU NELUO BOLI JIALE YED YEDE CLO SCARE AOCO DEDE DEDEI BAWU JIUG BADEB BADEB HOLE BALUX GES FANT QUAR YIHE SWAB SLIPP CLU DEPOS BILIY YUANO SOME NO YELA EMPT ZECUN XIAHE BOLEL DEJI MACID XIHON XITO LUCK MENJI GELU DECI XIDE DASAJ DONGN RICUL MINXI BALIY ZENDA LUZEL HELE5 0FENB KAIL JIAND CARP JINDE LAPU MUDE YIFU LINLI SANDI HUSI JINC OUMU OUMUX CAP KUIZA PUD TIAO FRMAN CLAU SPARK DRAGO BOLIU GUAIL MIYOU MIY QIAOK BEIL MUKEI RIDED MADAM BAGEP CROC ALIGE OUDAL OUD DADA HEHE YEDEA NUXI NUXIN ROUY ALIAD STICK QIANG LAAND PIQI PI PUPI DEKE DEKEJ NADI NADIO MALI PEA ELECT FLOWE MAL MALI HUSHU NILEE YUZI POPOZ DUZI HEBA XIAN SHAN YEYEA WUY LUO KEFE HULA CROW YADEH MOW ANNAN SUONI KYLI HULU HUDEL YEHE GULAE YEHE BLU GELAN BOAT NIP POIT HELAK XINL BEAR LINB MAGEH MAGEJ WULI YIDE RIVE FISH AOGU DELIE MANTE KONMU DELU HELU HUAN HUMA DONGF JINCA HEDE DEFU LIBY JIAPA MEJI HELE BUHU MILK HABI THUN GARD DON YANGQ SANAQ BANQ LUJ PHIX SIEI EGG) - NUM1=$(random_number ${#MOVES[@]}) - NUM2=$(random_number ${#MOVES[@]}) - NUM3=$(random_number ${#NAMES[@]}) + NUM1=$(fn-random-number ${#MOVES[@]}) + NUM2=$(fn-random-number ${#MOVES[@]}) + NUM3=$(fn-random-number ${#NAMES[@]}) UPPER_APPNAME="${MOVES[${NUM1}]}-${MOVES[${NUM2}]}-${NAMES[${NUM3}]}" @@ -28,17 +28,17 @@ random_name() { echo "$lower_appname" } -client_help_msg() { +fn-client-help-msg() { echo "==> Configure the DOKKU_HOST environment variable or run $0 from a repository with a git remote named dokku" echo "--> i.e. git remote add dokku dokku@:" exit 20 # exit with specific status. only used in units tests for now } -is_git_repo() { +fn-is-git-repo() { git rev-parse &>/dev/null } -has_dokku_remote() { +fn-has-dokku-remote() { git remote show | grep dokku } @@ -46,7 +46,7 @@ if [[ -z $DOKKU_HOST ]]; then if [[ -d .git ]] || git rev-parse --git-dir > /dev/null 2>&1; then DOKKU_HOST=$(git remote -v 2>/dev/null | grep -Ei "^dokku" | head -n 1 | cut -f1 -d' ' | cut -f2 -d '@' | cut -f1 -d':' 2>/dev/null || true) else - client_help_msg + fn-client-help-msg fi fi @@ -66,7 +66,7 @@ if [[ ! -z $DOKKU_HOST ]]; then case "$1" in apps:create) if [[ -z "$2" ]]; then - appname=$(random_name) + appname=$(fn-random-name) counter=0 while ssh -p "$DOKKU_PORT" "dokku@$DOKKU_HOST" apps 2>/dev/null| grep -q "$appname"; do if [[ $counter -ge 100 ]]; then @@ -90,7 +90,7 @@ if [[ ! -z $DOKKU_HOST ]]; then fi ;; apps:destroy) - is_git_repo && has_dokku_remote && git remote remove dokku + fn-is-git-repo && fn-has-dokku-remote && git remote remove dokku ;; esac @@ -105,5 +105,5 @@ if [[ ! -z $DOKKU_HOST ]]; then exit $? fi else - client_help_msg + fn-client-help-msg fi From 5ddcf06ce93011fe9a016debc58ee52cfe4dc868 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 9 Jan 2017 01:15:22 -0700 Subject: [PATCH 33/68] feat: add the ability to specify a remote via the `--remote` flag Closes #2523 --- contrib/dokku_client.sh | 138 ++++++++++++++++++++++------------------ 1 file changed, 77 insertions(+), 61 deletions(-) diff --git a/contrib/dokku_client.sh b/contrib/dokku_client.sh index 5b0f8ada5..a3cf2bbfe 100755 --- a/contrib/dokku_client.sh +++ b/contrib/dokku_client.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x +export DOKKU_PORT=${DOKKU_PORT:=22} +export DOKKU_HOST=${DOKKU_HOST:=} fn-random-number() { [[ -n "$1" ]] && RANGE="$1" @@ -39,71 +41,85 @@ fn-is-git-repo() { } fn-has-dokku-remote() { - git remote show | grep dokku + git remote show | grep -E "^${DOKKU_GIT_REMOTE}\s" } -if [[ -z $DOKKU_HOST ]]; then - if [[ -d .git ]] || git rev-parse --git-dir > /dev/null 2>&1; then - DOKKU_HOST=$(git remote -v 2>/dev/null | grep -Ei "^dokku" | head -n 1 | cut -f1 -d' ' | cut -f2 -d '@' | cut -f1 -d':' 2>/dev/null || true) - else - fn-client-help-msg - fi -fi +fn-dokku-host() { + declare DOKKU_GIT_REMOTE="$1" DOKKU_HOST="$2" -export DOKKU_PORT=${DOKKU_PORT:=22} - -if [[ ! -z $DOKKU_HOST ]]; then - _dokku() { - appname="" + if [[ -z "$DOKKU_HOST" ]]; then if [[ -d .git ]] || git rev-parse --git-dir > /dev/null 2>&1; then - set +e - appname=$(git remote -v 2>/dev/null | grep -Ei "dokku@$DOKKU_HOST" | head -n 1 | cut -f2 -d'@' | cut -f1 -d' ' | cut -f2 -d':' 2>/dev/null) - set -e - else - echo "This is not a git repository" + DOKKU_HOST=$(git remote -v 2>/dev/null | grep -Ei "^${DOKKU_GIT_REMOTE}\s" | head -n 1 | cut -f1 -d' ' | cut -f2 -d '@' | cut -f1 -d':' 2>/dev/null || true) fi - - case "$1" in - apps:create) - if [[ -z "$2" ]]; then - appname=$(fn-random-name) - counter=0 - while ssh -p "$DOKKU_PORT" "dokku@$DOKKU_HOST" apps 2>/dev/null| grep -q "$appname"; do - if [[ $counter -ge 100 ]]; then - echo "Error: could not reasonably generate a new app name. try cleaning up some apps..." - ssh -p "$DOKKU_PORT" "dokku@$DOKKU_HOST" apps - exit 1 - else - appname=$(random_name) - counter=$((counter+1)) - fi - done - else - appname="$2" - fi - if git remote add dokku "dokku@$DOKKU_HOST:$appname"; then - echo "-----> Dokku remote added at $DOKKU_HOST" - echo "-----> Application name is $appname" - else - echo "! Dokku remote not added! Do you already have a dokku remote?" - return - fi - ;; - apps:destroy) - fn-is-git-repo && fn-has-dokku-remote && git remote remove dokku - ;; - esac - - [[ -n "$@" ]] && [[ -n "$appname" ]] && app_arg="--app $appname" - # echo "ssh -o LogLevel=QUIET -p $DOKKU_PORT -t dokku@$DOKKU_HOST -- $app_arg $@" - # shellcheck disable=SC2068,SC2086 - ssh -o LogLevel=QUIET -p $DOKKU_PORT -t dokku@$DOKKU_HOST -- $app_arg $@ - } - - if [[ "$0" == "dokku" ]] || [[ "$0" == *dokku_client.sh ]] || [[ "$0" == $(which dokku) ]]; then - _dokku "$@" - exit $? fi -else - fn-client-help-msg + + echo "$DOKKU_HOST" +} + +main() { + local DOKKU_GIT_REMOTE + local next_index=1; local skip=false; local args=("$@") + + for arg in "$@"; do + $skip && break + case "$arg" in + --remote) + DOKKU_GIT_REMOTE=${args[$next_index]} + skip=true + shift 2 + ;; + esac + done + + DOKKU_HOST="$(fn-dokku-host "$DOKKU_GIT_REMOTE" "$DOKKU_HOST")" + + appname="" + if [[ -d .git ]] || git rev-parse --git-dir > /dev/null 2>&1; then + set +e + appname=$(git remote -v 2>/dev/null | grep -Ei "dokku@$DOKKU_HOST" | head -n 1 | cut -f2 -d'@' | cut -f1 -d' ' | cut -f2 -d':' 2>/dev/null) + set -e + else + echo "This is not a git repository" + fi + + case "$1" in + apps:create) + if [[ -z "$2" ]]; then + appname=$(fn-random-name) + counter=0 + while ssh -p "$DOKKU_PORT" "dokku@$DOKKU_HOST" apps 2>/dev/null| grep -q "$appname"; do + if [[ $counter -ge 100 ]]; then + echo "Error: could not reasonably generate a new app name. try cleaning up some apps..." + ssh -p "$DOKKU_PORT" "dokku@$DOKKU_HOST" apps + exit 1 + else + appname=$(random_name) + counter=$((counter+1)) + fi + done + else + appname="$2" + fi + if git remote add dokku "dokku@$DOKKU_HOST:$appname"; then + echo "-----> Dokku remote added at ${DOKKU_HOST} called ${DOKKU_GIT_REMOTE}" + echo "-----> Application name is ${appname}" + else + echo "! Dokku remote not added! Do you already have a dokku remote?" + return + fi + ;; + apps:destroy) + fn-is-git-repo && fn-has-dokku-remote && git remote remove "$DOKKU_GIT_REMOTE" + ;; + esac + + [[ -n "$@" ]] && [[ -n "$appname" ]] && app_arg="--app $appname" + # echo "ssh -o LogLevel=QUIET -p $DOKKU_PORT -t dokku@$DOKKU_HOST -- $app_arg $@" + # shellcheck disable=SC2068,SC2086 + ssh -o LogLevel=QUIET -p $DOKKU_PORT -t dokku@$DOKKU_HOST -- $app_arg $@ +} + +if [[ "$0" == "dokku" ]] || [[ "$0" == *dokku_client.sh ]] || [[ "$0" == $(which dokku) ]]; then + main "$@" + exit $? fi From 13c78e8e9a26940f505344e00cb1831b6a5c5d5e Mon Sep 17 00:00:00 2001 From: Justin Clark Date: Fri, 12 Aug 2016 19:57:31 -0700 Subject: [PATCH 34/68] Add exceptions back to dokku_client.sh for plugins that should not be passed an app name implicitly --- contrib/dokku_client.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/dokku_client.sh b/contrib/dokku_client.sh index a3cf2bbfe..00907eaf1 100755 --- a/contrib/dokku_client.sh +++ b/contrib/dokku_client.sh @@ -113,6 +113,9 @@ main() { ;; esac + [[ "$1" =~ apps|certs|certs:chain|domains:add-global|domains:remove-global|domains:set-global|help|ls|nginx|ps:rebuildall|ps:restartall|ps:restore|shell|storage|trace|version ]] && unset appname + [[ "$1" =~ events*|plugin*|ssh-keys* ]] && unset appname + [[ -n "$2" ]] && [[ "$2" == "--global" ]] && unset appname [[ -n "$@" ]] && [[ -n "$appname" ]] && app_arg="--app $appname" # echo "ssh -o LogLevel=QUIET -p $DOKKU_PORT -t dokku@$DOKKU_HOST -- $app_arg $@" # shellcheck disable=SC2068,SC2086 From e107c19dbf8e639650a97ff2b621de8f9931d0fb Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 9 Jan 2017 01:31:10 -0700 Subject: [PATCH 35/68] chore: remove extra local declarations --- contrib/dokku_client.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/dokku_client.sh b/contrib/dokku_client.sh index 00907eaf1..7a6b08812 100755 --- a/contrib/dokku_client.sh +++ b/contrib/dokku_client.sh @@ -58,7 +58,7 @@ fn-dokku-host() { main() { local DOKKU_GIT_REMOTE - local next_index=1; local skip=false; local args=("$@") + local next_index=1 skip=false args=("$@") for arg in "$@"; do $skip && break From 9272e4017872120b3cfec5ec745888be833c8473 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 9 Jan 2017 02:12:18 -0700 Subject: [PATCH 36/68] fix: skip following argument when current argument is --app --- dokku | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dokku b/dokku index 05ae39621..978d617f4 100755 --- a/dokku +++ b/dokku @@ -35,10 +35,12 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" parse_args "$@" args=("$@") +skip_arg=false if [[ "${args[0]}" =~ ^--.* ]]; then for arg in "$@"; do + $skip_arg && skip_arg=false && continue if [[ "$arg" == "--app" ]]; then - shift 2 + shift 2 && skip_arg=true elif [[ "$arg" =~ ^--.* ]]; then shift 1 else From 594b41cc709559b47aaad5a12f30ae99a61238be Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 9 Jan 2017 02:13:52 -0700 Subject: [PATCH 37/68] fix: properly handle argument parsing when skip is set to true Previously, using the --app flag would mean that we would stop properly parsing all proceeding flags, so the --app flag would only work when set last. --- plugins/common/functions | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/common/functions b/plugins/common/functions index 786cf4a34..20cb21c46 100755 --- a/plugins/common/functions +++ b/plugins/common/functions @@ -251,7 +251,12 @@ parse_args() { declare desc="top-level cli arg parser" local next_index=1; local skip=false; local args=("$@") for arg in "$@"; do - $skip && skip=false && continue + if [[ "$skip" == "true" ]]; then + next_index=$(( next_index + 1 )) + skip=false + continue + fi + case "$arg" in --quiet) export DOKKU_QUIET_OUTPUT=1 @@ -272,7 +277,7 @@ parse_args() { export DOKKU_APP_NAME=${args[$next_index]}; skip=true ;; esac - local next_index=$(( next_index + 1 )) + next_index=$(( next_index + 1 )) done return 0 } From 6e00064cb39798f9e17bac0492dc5e8ed691d656 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 9 Jan 2017 02:33:45 -0700 Subject: [PATCH 38/68] fix: Properly parse flags in the dokku client MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Respect the --app flag - Respect the --trace flag - Skip the second argument after both --app and --remote flags - The `--global` flag should be set as is when specified after a “valid” command - Fix issues when checking if the --app flag should be passed via ssh - Use APP as the variable name for the current app --- contrib/dokku_client.sh | 80 ++++++++++++++++++++++++++--------------- 1 file changed, 51 insertions(+), 29 deletions(-) diff --git a/contrib/dokku_client.sh b/contrib/dokku_client.sh index 7a6b08812..9ba6d9d63 100755 --- a/contrib/dokku_client.sh +++ b/contrib/dokku_client.sh @@ -57,52 +57,73 @@ fn-dokku-host() { } main() { - local DOKKU_GIT_REMOTE - local next_index=1 skip=false args=("$@") + declare CMD="$1" APP_ARG="$2" + local DOKKU_GIT_REMOTE APP="" + local cmd_set=false arg_set="$2" next_index=1 skip=false args=("$@") for arg in "$@"; do - $skip && break - case "$arg" in - --remote) - DOKKU_GIT_REMOTE=${args[$next_index]} - skip=true - shift 2 - ;; - esac + if [[ "$skip" == "true" ]]; then + next_index=$(( next_index + 1 )) + skip=false + continue + fi + + if [[ "$arg" == "--app" ]]; then + APP=${args[$next_index]} + skip=true + shift 2 + elif [[ "$arg" == "--remote" ]]; then + DOKKU_GIT_REMOTE=${args[$next_index]} + skip=true + shift 2 + elif [[ "$arg" =~ ^--.* ]]; then + [[ "$cmd_set" == "true" ]] && APP_ARG="$arg" && break + [[ "$arg" == "--trace" ]] && export DOKKU_TRACE=1 + else + if [[ "$cmd_set" == "true" ]]; then + APP_ARG="$arg" + break + else + CMD="$arg" + cmd_set=true + fi + fi + next_index=$(( next_index + 1 )) done DOKKU_HOST="$(fn-dokku-host "$DOKKU_GIT_REMOTE" "$DOKKU_HOST")" - appname="" - if [[ -d .git ]] || git rev-parse --git-dir > /dev/null 2>&1; then - set +e - appname=$(git remote -v 2>/dev/null | grep -Ei "dokku@$DOKKU_HOST" | head -n 1 | cut -f2 -d'@' | cut -f1 -d' ' | cut -f2 -d':' 2>/dev/null) - set -e - else - echo "This is not a git repository" + if [[ -z "$APP" ]]; then + if [[ -d .git ]] || git rev-parse --git-dir > /dev/null 2>&1; then + set +e + APP=$(git remote -v 2>/dev/null | grep -Ei "dokku@$DOKKU_HOST" | head -n 1 | cut -f2 -d'@' | cut -f1 -d' ' | cut -f2 -d':' 2>/dev/null) + set -e + else + echo "This is not a git repository" + fi fi - case "$1" in + case "$CMD" in apps:create) - if [[ -z "$2" ]]; then - appname=$(fn-random-name) + if [[ -z "$APP_ARG" ]]; then + APP=$(fn-random-name) counter=0 - while ssh -p "$DOKKU_PORT" "dokku@$DOKKU_HOST" apps 2>/dev/null| grep -q "$appname"; do + while ssh -p "$DOKKU_PORT" "dokku@$DOKKU_HOST" apps 2>/dev/null| grep -q "$APP"; do if [[ $counter -ge 100 ]]; then echo "Error: could not reasonably generate a new app name. try cleaning up some apps..." ssh -p "$DOKKU_PORT" "dokku@$DOKKU_HOST" apps exit 1 else - appname=$(random_name) + APP=$(random_name) counter=$((counter+1)) fi done else - appname="$2" + APP="$APP_ARG" fi - if git remote add dokku "dokku@$DOKKU_HOST:$appname"; then + if git remote add dokku "dokku@$DOKKU_HOST:$APP"; then echo "-----> Dokku remote added at ${DOKKU_HOST} called ${DOKKU_GIT_REMOTE}" - echo "-----> Application name is ${appname}" + echo "-----> Application name is ${APP}" else echo "! Dokku remote not added! Do you already have a dokku remote?" return @@ -113,10 +134,11 @@ main() { ;; esac - [[ "$1" =~ apps|certs|certs:chain|domains:add-global|domains:remove-global|domains:set-global|help|ls|nginx|ps:rebuildall|ps:restartall|ps:restore|shell|storage|trace|version ]] && unset appname - [[ "$1" =~ events*|plugin*|ssh-keys* ]] && unset appname - [[ -n "$2" ]] && [[ "$2" == "--global" ]] && unset appname - [[ -n "$@" ]] && [[ -n "$appname" ]] && app_arg="--app $appname" + [[ " apps certs help ls nginx shell storage trace version " == *" $CMD "* ]] && unset APP + [[ " certs:chain domains:add-global domains:remove-global domains:set-global ps:rebuildall ps:restartall ps:restore " == *" $CMD "* ]] && unset APP + [[ "$CMD" =~ events*|plugin*|ssh-keys* ]] && unset APP + [[ -n "$APP_ARG" ]] && [[ "$APP_ARG" == "--global" ]] && unset APP + [[ -n "$@" ]] && [[ -n "$APP" ]] && app_arg="--app $APP" # echo "ssh -o LogLevel=QUIET -p $DOKKU_PORT -t dokku@$DOKKU_HOST -- $app_arg $@" # shellcheck disable=SC2068,SC2086 ssh -o LogLevel=QUIET -p $DOKKU_PORT -t dokku@$DOKKU_HOST -- $app_arg $@ From c216b3be7f5f2aec0dfcab44eeaa1605b73a35fd Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 9 Jan 2017 02:34:48 -0700 Subject: [PATCH 39/68] feat: add support for --global flag when calling `dokku domains` --- docs/configuration/domains.md | 2 +- plugins/domains/subcommands/default | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/configuration/domains.md b/docs/configuration/domains.md index 9313a6258..86e9e3e7e 100644 --- a/docs/configuration/domains.md +++ b/docs/configuration/domains.md @@ -3,7 +3,7 @@ > New as of 0.3.10 ``` -domains [] # List domains +domains [|--global] # List domains domains:add [ ...] # Add domains to app domains:add-global [ ...] # Add global domain names domains:clear # Clear all domains for app diff --git a/plugins/domains/subcommands/default b/plugins/domains/subcommands/default index 011a1c292..c046e7fac 100755 --- a/plugins/domains/subcommands/default +++ b/plugins/domains/subcommands/default @@ -12,6 +12,11 @@ domains_main_cmd() { dokku_log_info2_quiet "Global Domain Name" get_global_vhosts fi + + if [[ "$APP" == "--global" ]]; then + return + fi + if [[ -n "$APP" ]]; then verify_app_name "$APP" if [[ -f "$DOKKU_ROOT/$APP/VHOST" ]]; then From 90510378c85fee4e7106cb65db1de4bfff633024 Mon Sep 17 00:00:00 2001 From: Edgars Beigarts Date: Thu, 12 Jan 2017 13:27:22 +0200 Subject: [PATCH 40/68] Improve install documentation on CentOS --- README.md | 8 +++++++- docs/getting-started/install/rpm.md | 6 +++++- docs/getting-started/installation.md | 6 ++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c6febc908..d3ed4328a 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,13 @@ Docker powered mini-Heroku. The smallest PaaS implementation you've ever seen. ## Requirements -- A fresh VM running `Debian 8.2 x64`, `Ubuntu 14.04 x64`, or `Ubuntu 16.04 x64` +A fresh VM running any of the following OS: + +- Ubuntu 16.04 x64 +- Ubuntu 14.04 x64 +- Debian 8.2 x64 +- CentOS 7 x64 *(experimental)* +- Arch Linux x64 *(experimental)* ## Installing diff --git a/docs/getting-started/install/rpm.md b/docs/getting-started/install/rpm.md index 1b71370d8..f51e9283f 100644 --- a/docs/getting-started/install/rpm.md +++ b/docs/getting-started/install/rpm.md @@ -1,6 +1,8 @@ # RPM Package Installation Notes -> New as of 0.8.0 +> New as of 0.8.0 *(experimental)* + +>**Warning:** Web installer is not available on CentOS. You will need to configure [SSH keys](/dokku/deployment/user-management/#adding-ssh-keys) and [virtual hosts](/dokku/configuration/domains/#customizing-hostnames) using dokku command line interface. Dokku defaults to being installed via RPM package on CentOS 7. While certain hosts may require extra work to get running, you may optionally wish to automate the installation of Dokku without the use of our `bootstrap.sh` bash script. The following are the steps run by said script: @@ -16,3 +18,5 @@ curl -s https://packagecloud.io/install/repositories/dokku/dokku/script.rpm.sh | sudo yum install -y herokuish dokku sudo dokku plugin:install-dependencies --core ``` + +The [devicemapper](https://docs.docker.com/engine/userguide/storagedriver/device-mapper-driver/) is the default Docker storage driver on CentOS 7 and defaults to a configuration mode known as `loop-lvm`. This mode is designed to work out-of-the-box with no additional configuration. However, production deployments should not run under `loop-lvm` mode. The preferred configuration for production deployments is [`direct-lvm`](https://docs.docker.com/engine/userguide/storagedriver/device-mapper-driver/#/configure-direct-lvm-mode-for-production). diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index 6e0358d2e..e2c5ddb1e 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -6,12 +6,12 @@ Dokku is an extensible, open source Platform as a Service that runs on a single To start using Dokku, you'll need a system that meets the following minimum requirements: -- A fresh installation of [Ubuntu 14.04 x64](http://www.ubuntu.com/download/) with the FQDN set [1] +- A fresh installation of [Ubuntu 16.04 x64](https://www.ubuntu.com/download), [Ubuntu 14.04 x64](https://www.ubuntu.com/download), [Debian 8.2 x64](https://www.debian.org/distrib/) or [CentOS 7 x64](https://www.centos.org/download/) *(experimental)* with the FQDN set [1] - At least `1GB` of system memory [2] You can *optionally* have a domain name pointed at the host's IP, though this is not necessary. -Dokku is designed for usage on a fresh installation of Ubuntu, and should install all necessary dependencies if installing via the bootstrap method. +Dokku is designed for usage on a fresh VM installation, and should install all necessary dependencies if installing via the bootstrap method. ### Installing the latest stable version @@ -33,6 +33,8 @@ Once the installation is complete, you can open a browser to setup your SSH key >**Warning:** If you don't complete setup via the web installer (even if you set up SSH keys and virtual hosts otherwise) your Dokku installation will remain vulnerable to anyone finding the setup page and inserting their key. +>**Warning:** Web installer is not available on CentOS and Arch Linux. You will need to configure [SSH keys](/dokku/deployment/user-management/#adding-ssh-keys) and [virtual hosts](/dokku/configuration/domains/#customizing-hostnames) using dokku command line interface. + #### 3. Deploy your first application Once you save your settings, the web admin will self-terminate and you should be able to run or deploy to the Dokku installation. From 0de746da4e62dd08e437bce5f5c7eb2bd8af6251 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Fri, 13 Jan 2017 16:20:13 -0700 Subject: [PATCH 41/68] fix shellcheck issues --- plugins/git/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/git/functions b/plugins/git/functions index dd6ac32a2..620da1729 100755 --- a/plugins/git/functions +++ b/plugins/git/functions @@ -47,7 +47,7 @@ suppress_output() { TMP_COMMAND_OUTPUT=$(mktemp "/tmp/${FUNCNAME[0]}.XXXX") trap 'rm -rf "$TMP_COMMAND_OUTPUT" > /dev/null' RETURN INT TERM EXIT - $* 2>&1 > "$TMP_COMMAND_OUTPUT" || { + "$@" > "$TMP_COMMAND_OUTPUT" 2>&1 || { local exit_code="$?" cat "$TMP_COMMAND_OUTPUT" return "$exit_code" From 06fa58ff47ca935459a90e8ef7e7f14356f18ad5 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Fri, 13 Jan 2017 17:29:51 -0700 Subject: [PATCH 42/68] chore: remove extra space [ci skip] --- plugins/ps/subcommands/restore | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/ps/subcommands/restore b/plugins/ps/subcommands/restore index 1dab28f4b..818c3d980 100755 --- a/plugins/ps/subcommands/restore +++ b/plugins/ps/subcommands/restore @@ -20,7 +20,6 @@ ps_restore_cmd() { if ps_start "$app"; then continue fi - dokku_log_warn "dokku ps:restore ${app} failed" fi done From 24c4f25dd0558f73f152dbc2f8921e7100856d69 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 14 Jan 2017 13:58:45 -0700 Subject: [PATCH 43/68] fix: set DOKKU_GIT_REMOTE to a default of dokku --- contrib/dokku_client.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/dokku_client.sh b/contrib/dokku_client.sh index 9ba6d9d63..707a6b98a 100755 --- a/contrib/dokku_client.sh +++ b/contrib/dokku_client.sh @@ -58,7 +58,7 @@ fn-dokku-host() { main() { declare CMD="$1" APP_ARG="$2" - local DOKKU_GIT_REMOTE APP="" + local DOKKU_GIT_REMOTE="dokku" APP="" local cmd_set=false arg_set="$2" next_index=1 skip=false args=("$@") for arg in "$@"; do From 0f5dec17978415a6c54238ca23be648a251fd4ce Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 14 Jan 2017 14:00:21 -0700 Subject: [PATCH 44/68] refactor: rename variable usage to DOKKU_REMOTE_HOST This allows us to make it a local variable --- contrib/dokku_client.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/contrib/dokku_client.sh b/contrib/dokku_client.sh index 707a6b98a..46bcbf718 100755 --- a/contrib/dokku_client.sh +++ b/contrib/dokku_client.sh @@ -58,7 +58,7 @@ fn-dokku-host() { main() { declare CMD="$1" APP_ARG="$2" - local DOKKU_GIT_REMOTE="dokku" APP="" + local APP="" DOKKU_GIT_REMOTE="dokku" DOKKU_REMOTE_HOST="" local cmd_set=false arg_set="$2" next_index=1 skip=false args=("$@") for arg in "$@"; do @@ -78,7 +78,7 @@ main() { shift 2 elif [[ "$arg" =~ ^--.* ]]; then [[ "$cmd_set" == "true" ]] && APP_ARG="$arg" && break - [[ "$arg" == "--trace" ]] && export DOKKU_TRACE=1 + [[ "$arg" == "--trace" ]] && export DOKKU_TRACE=1 && set -x else if [[ "$cmd_set" == "true" ]]; then APP_ARG="$arg" @@ -91,12 +91,12 @@ main() { next_index=$(( next_index + 1 )) done - DOKKU_HOST="$(fn-dokku-host "$DOKKU_GIT_REMOTE" "$DOKKU_HOST")" + DOKKU_REMOTE_HOST="$(fn-dokku-host "$DOKKU_GIT_REMOTE" "$DOKKU_HOST")" if [[ -z "$APP" ]]; then if [[ -d .git ]] || git rev-parse --git-dir > /dev/null 2>&1; then set +e - APP=$(git remote -v 2>/dev/null | grep -Ei "dokku@$DOKKU_HOST" | head -n 1 | cut -f2 -d'@' | cut -f1 -d' ' | cut -f2 -d':' 2>/dev/null) + APP=$(git remote -v 2>/dev/null | grep -Ei "dokku@$DOKKU_REMOTE_HOST" | head -n 1 | cut -f2 -d'@' | cut -f1 -d' ' | cut -f2 -d':' 2>/dev/null) set -e else echo "This is not a git repository" @@ -108,10 +108,10 @@ main() { if [[ -z "$APP_ARG" ]]; then APP=$(fn-random-name) counter=0 - while ssh -p "$DOKKU_PORT" "dokku@$DOKKU_HOST" apps 2>/dev/null| grep -q "$APP"; do + while ssh -p "$DOKKU_PORT" "dokku@$DOKKU_REMOTE_HOST" apps 2>/dev/null| grep -q "$APP"; do if [[ $counter -ge 100 ]]; then echo "Error: could not reasonably generate a new app name. try cleaning up some apps..." - ssh -p "$DOKKU_PORT" "dokku@$DOKKU_HOST" apps + ssh -p "$DOKKU_PORT" "dokku@$DOKKU_REMOTE_HOST" apps exit 1 else APP=$(random_name) @@ -121,8 +121,8 @@ main() { else APP="$APP_ARG" fi - if git remote add dokku "dokku@$DOKKU_HOST:$APP"; then - echo "-----> Dokku remote added at ${DOKKU_HOST} called ${DOKKU_GIT_REMOTE}" + if git remote add dokku "dokku@$DOKKU_REMOTE_HOST:$APP"; then + echo "-----> Dokku remote added at ${DOKKU_REMOTE_HOST} called ${DOKKU_GIT_REMOTE}" echo "-----> Application name is ${APP}" else echo "! Dokku remote not added! Do you already have a dokku remote?" @@ -139,9 +139,9 @@ main() { [[ "$CMD" =~ events*|plugin*|ssh-keys* ]] && unset APP [[ -n "$APP_ARG" ]] && [[ "$APP_ARG" == "--global" ]] && unset APP [[ -n "$@" ]] && [[ -n "$APP" ]] && app_arg="--app $APP" - # echo "ssh -o LogLevel=QUIET -p $DOKKU_PORT -t dokku@$DOKKU_HOST -- $app_arg $@" + # echo "ssh -o LogLevel=QUIET -p $DOKKU_PORT -t dokku@$DOKKU_REMOTE_HOST -- $app_arg $@" # shellcheck disable=SC2068,SC2086 - ssh -o LogLevel=QUIET -p $DOKKU_PORT -t dokku@$DOKKU_HOST -- $app_arg $@ + ssh -o LogLevel=QUIET -p $DOKKU_PORT -t dokku@$DOKKU_REMOTE_HOST -- $app_arg $@ } if [[ "$0" == "dokku" ]] || [[ "$0" == *dokku_client.sh ]] || [[ "$0" == $(which dokku) ]]; then From 67f05b8eed1b05c8d3bf6d0924525b84d8a3fec6 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 14 Jan 2017 14:02:14 -0700 Subject: [PATCH 45/68] fix: show error message when there is no DOKKU_REMOTE_HOST available --- contrib/dokku_client.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/contrib/dokku_client.sh b/contrib/dokku_client.sh index 46bcbf718..45267ae12 100755 --- a/contrib/dokku_client.sh +++ b/contrib/dokku_client.sh @@ -31,8 +31,8 @@ fn-random-name() { } fn-client-help-msg() { - echo "==> Configure the DOKKU_HOST environment variable or run $0 from a repository with a git remote named dokku" - echo "--> i.e. git remote add dokku dokku@:" + echo "==> Configure the DOKKU_HOST environment variable or run $0 from a repository with a git remote named dokku" 1>&2 + echo "--> i.e. git remote add dokku dokku@:" 1>&2 exit 20 # exit with specific status. only used in units tests for now } @@ -53,6 +53,10 @@ fn-dokku-host() { fi fi + if [[ -z "$DOKKU_HOST" ]]; then + fn-client-help-msg + fi + echo "$DOKKU_HOST" } From 8497bd6d707f276e59dede423c7d0d062efd548a Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 14 Jan 2017 14:08:22 -0700 Subject: [PATCH 46/68] chore: remove extra newline [ci skip] --- plugins/git/functions | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/git/functions b/plugins/git/functions index 620da1729..96ce9b9aa 100755 --- a/plugins/git/functions +++ b/plugins/git/functions @@ -55,7 +55,6 @@ suppress_output() { return 0 } - git_hook_cmd() { declare desc="kick off receive-app trigger from git prereceive hook" local cmd="git-hook" From fc4b7ce0ee656b7ad2723cf888059f29efc05e31 Mon Sep 17 00:00:00 2001 From: klemens Date: Sat, 14 Jan 2017 22:35:24 +0100 Subject: [PATCH 47/68] spelling fixes --- docs/configuration/ssl.md | 2 +- docs/deployment/process-management.md | 4 ++-- plugins/checks/commands | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/configuration/ssl.md b/docs/configuration/ssl.md index 8656606c6..31d8a080f 100644 --- a/docs/configuration/ssl.md +++ b/docs/configuration/ssl.md @@ -50,7 +50,7 @@ Note that with the default nginx template, requests will be redirected to the `h The `certs:generate` command will walk you through the correct `openssl` commands to create a key, csr and a self-signed cert for a given app/domain. We automatically put the self-signed cert in place as well as add the specified domain to the application configuration. -If you decide to obtain a CA signed certficate, you can import that certificate using the aformentioned `dokku certs:add` command. +If you decide to obtain a CA signed certificate, you can import that certificate using the aforementioned `dokku certs:add` command. ### Certificate information diff --git a/docs/deployment/process-management.md b/docs/deployment/process-management.md index bd924e4e4..997dcd240 100644 --- a/docs/deployment/process-management.md +++ b/docs/deployment/process-management.md @@ -31,7 +31,7 @@ dokku ps node-js-app ### Rebuilding applications -There are some Dokku commands which will not automatically rebuild an application's environment, or which can be told to skip a rebuild. For instance, you may wish to run mulitple `config:set` commands without a restart so as to speed up configuration. In these cases, you can ultimately trigger an application rebuild using `ps:rebuild` +There are some Dokku commands which will not automatically rebuild an application's environment, or which can be told to skip a rebuild. For instance, you may wish to run multiple `config:set` commands without a restart so as to speed up configuration. In these cases, you can ultimately trigger an application rebuild using `ps:rebuild` ```shell dokku ps:rebuild node-js-app @@ -92,7 +92,7 @@ dokku ps:scale node-js-app ### Stopping applications -Deployed applications can be stopped using the `ps:stop` command. This turns all running containers for an application, and will result in a `502 Bad Gateway` reponse for the default nginx proxy implementation. +Deployed applications can be stopped using the `ps:stop` command. This turns all running containers for an application, and will result in a `502 Bad Gateway` response for the default nginx proxy implementation. ```shell dokku ps:stop node-js-app diff --git a/plugins/checks/commands b/plugins/checks/commands index 2400b5ee0..5f27055ac 100755 --- a/plugins/checks/commands +++ b/plugins/checks/commands @@ -16,7 +16,7 @@ help_content } if [[ $1 = "checks:help" ]] ; then - echo -e 'Usage: dokku checks[:COMAND]' + echo -e 'Usage: dokku checks[:COMMAND]' echo '' echo 'Manage zero-downtime settings.' echo '' From e09d09323950af566756a529e52e9bf2f05fae76 Mon Sep 17 00:00:00 2001 From: klemens Date: Sat, 14 Jan 2017 22:38:27 +0100 Subject: [PATCH 48/68] spelling fixes --- docs/advanced-usage/repository-management.md | 4 ++-- plugins/repo/commands | 2 +- plugins/repo/subcommands/gc | 2 +- tests/apps/multi/static/styles/main.scss | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/advanced-usage/repository-management.md b/docs/advanced-usage/repository-management.md index 9cee535aa..e8235f863 100644 --- a/docs/advanced-usage/repository-management.md +++ b/docs/advanced-usage/repository-management.md @@ -3,7 +3,7 @@ > New as of 0.6.0 ``` -repo:gc # Runs 'git gc --agressive' against the application's repo +repo:gc # Runs 'git gc --aggressive' against the application's repo repo:purge-cache # Deletes the contents of the build cache stored in the repository ``` @@ -13,7 +13,7 @@ The repository plugin is meant to allow users to perform management commands aga ### Git Garbage Collection -This will run a git gc --agressive against the applications repo. This is performed on the Dokku host, and not within an application container. +This will run a git gc --aggressive against the applications repo. This is performed on the Dokku host, and not within an application container. ```shell dokku repo:gc node-js-app diff --git a/plugins/repo/commands b/plugins/repo/commands index 5025f89f5..816768bf3 100755 --- a/plugins/repo/commands +++ b/plugins/repo/commands @@ -7,7 +7,7 @@ case "$1" in help_content_func () { declare desc="return repo plugin help content" cat<, Runs 'git gc --agressive' against the application's repo + repo:gc , Runs 'git gc --aggressive' against the application's repo repo:purge-cache , Deletes the contents of the build cache stored in the repository help_content } diff --git a/plugins/repo/subcommands/gc b/plugins/repo/subcommands/gc index 0fd3f281e..fbeb9b153 100755 --- a/plugins/repo/subcommands/gc +++ b/plugins/repo/subcommands/gc @@ -3,7 +3,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" repo_gc() { - declare desc="runs 'git gc --agressive' against the application's repo" + declare desc="runs 'git gc --aggressive' against the application's repo" local cmd="repo:gc" [[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on" local APP="$2"; local APP_DIR="$DOKKU_ROOT/$APP" diff --git a/tests/apps/multi/static/styles/main.scss b/tests/apps/multi/static/styles/main.scss index 93efb53fa..20b7ae981 100644 --- a/tests/apps/multi/static/styles/main.scss +++ b/tests/apps/multi/static/styles/main.scss @@ -1,4 +1,4 @@ -// override scss variables within bootsrap by delaring them +// override scss variables within bootsrap by declaring them // before importing bootstrap $brand-primary: #428bca !default; From f0ecac59986b748c7a9b75827cdce165b810a8d8 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 15 Jan 2017 01:05:08 -0700 Subject: [PATCH 49/68] Update persistent storage to reference the sample app as normal [ci skip] --- docs/advanced-usage/persistent-storage.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/advanced-usage/persistent-storage.md b/docs/advanced-usage/persistent-storage.md index a34f7bd2a..5410debaa 100644 --- a/docs/advanced-usage/persistent-storage.md +++ b/docs/advanced-usage/persistent-storage.md @@ -17,10 +17,11 @@ The storage plugin requires explicit paths on the host side. This is intentional ## Usage -This example demonstrates how to mount the recommended directory to `/storage` inside the container: +This example demonstrates how to mount the recommended directory to `/storage` inside an application called `node-js-app`: ```shell -dokku storage:mount app-name /var/lib/dokku/data/storage:/storage +# we use a subdirectory inside of the host directory to scope it to just the app +dokku storage:mount node-js-app /var/lib/dokku/data/storage/node-js-app:/storage ``` Dokku will then mount the shared contents of `/var/lib/dokku/data/storage` to `/storage` inside the container. @@ -35,17 +36,17 @@ dokku ps:rebuild app-name A more complete workflow may require making a custom directory for your application and mounting it within your `/app/storage` directory instead. The mount point is *not* relative to your application's working directory, and is instead relative to the root of the container. ```shell -# creating storage for the app 'ruby-rails-sample' -mkdir -p /var/lib/dokku/data/storage/ruby-rails-sample +# creating storage for the app 'node-js-app' +mkdir -p /var/lib/dokku/data/storage/node-js-app # ensure the proper user has access to this directory -chown -R dokku:dokku /var/lib/dokku/data/storage/ruby-rails-sample +chown -R dokku:dokku /var/lib/dokku/data/storage/node-js-app # as of 0.7.x, you should chown using the `32767` user and group id -chown -R 32767:32767 /var/lib/dokku/data/storage/ruby-rails-sample +chown -R 32767:32767 /var/lib/dokku/data/storage/node-js-app # mount the directory into your container's /app/storage directory, relative to root -dokku storage:mount app-name /var/lib/dokku/data/storage/app-name:/app/storage +dokku storage:mount app-name /var/lib/dokku/data/storage/node-js-app:/app/storage ``` You can mount one or more directories as desired by following the above pattern. From 927d569db592171123504180aabd462fb2edbcce Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 15 Jan 2017 01:07:12 -0700 Subject: [PATCH 50/68] Move "new as of" note to correct section Also move note up. [ci skip] --- docs/advanced-usage/persistent-storage.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/docs/advanced-usage/persistent-storage.md b/docs/advanced-usage/persistent-storage.md index 5410debaa..4cf00aafe 100644 --- a/docs/advanced-usage/persistent-storage.md +++ b/docs/advanced-usage/persistent-storage.md @@ -11,6 +11,8 @@ storage:mount # Create a new bind mount storage:unmount # Remove an existing bind mount ``` +> The storage plugin is compatible with storage mounts created with the docker-options. The storage plugin will only list mounts from the deploy/run phase. + ## Ideology and Background The storage plugin requires explicit paths on the host side. This is intentional to ensure that new users avoid running into unexpected results with implicit paths that may not exist (a feature deprecate in [Docker 1.9.0](https://github.com/docker/docker/releases/tag/v1.9.0])). The container directory is created for the mount point in the container. Any existing directory contents are not accessible after a mount is added to the container. Dokku creates a new directory `/var/lib/dokku/data/storage` during installation, it's the general consensus that new users should use this directory. Mounts are only available at run and deploy times, you must redeploy (restart) an app to mount or unmount to an existing app's container. @@ -81,15 +83,10 @@ You cannot use mounted volumes during the build phase of a Dockerfile deploy. Th > Note: **This can cause data loss** if you bind a mount under `/app` in buildpack apps as herokuish will attempt to remove the original app path during the build phase. -## Docker-Options Note - -The storage plugin is compatible with storage mounts created with the docker-options. The storage plugin will only list mounts from the deploy phase. - +## Application User and Persistent Storage file ownership (buildpack apps only) > New as of 0.7.1 -## Application User and Persistent Storage file ownership (buildpack apps only) - By default, Dokku will execute your buildpack application processes as the `herokuishuser` user. You may override this by setting the `DOKKU_APP_USER` config variable. > NOTE: this user must exist in your herokuish image. From f5f2a5f1719492eadf0a17d84f9faf2eb6d79c30 Mon Sep 17 00:00:00 2001 From: Alexis Tyler Date: Mon, 16 Jan 2017 18:12:11 +1030 Subject: [PATCH 51/68] Reload nginx after creating default vhost file --- docs/configuration/domains.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/configuration/domains.md b/docs/configuration/domains.md index 9313a6258..b71b2042c 100644 --- a/docs/configuration/domains.md +++ b/docs/configuration/domains.md @@ -92,6 +92,8 @@ server { } ``` +Make sure to reload nginx after creating this file by running `service nginx reload`. + This will catch all unknown HOST header values and return a `410 Gone` response. You can replace the `return 410;` with `return 444;` which will cause nginx to not respond to requests that do not match known domains (connection refused). The configuration file must be loaded before `/etc/nginx/conf.d/dokku.conf`, so it can not be arranged as a vhost in `/etc/nginx/sites-enabled` that is only processed afterwards. From b874692d06168e562b7d591f446662d9e1a645ac Mon Sep 17 00:00:00 2001 From: Alexis Tyler Date: Mon, 16 Jan 2017 18:25:20 +1030 Subject: [PATCH 52/68] add dokku report command for 0.4.10+ --- ISSUE_TEMPLATE.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md index 0917e8bcc..c83340e33 100644 --- a/ISSUE_TEMPLATE.md +++ b/ISSUE_TEMPLATE.md @@ -3,6 +3,8 @@ Description of problem: Output of the following commands + + - `uname -a`: - `free -m`: - `docker version`: From 3a8e80c5307d36cd633f634892dd7675c1d169a7 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 16 Jan 2017 15:38:35 -0700 Subject: [PATCH 53/68] fix: use correct markup for link [ci skip] --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c2b73d82c..2ceb0e61b 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ If you wish for a more unattended installation method, see [these](http://dokku. ### Upgrade -[View the docs] for upgrading(http://dokku.viewdocs.io/dokku/getting-started/upgrading/) from an older version of Dokku. +[View the docs](http://dokku.viewdocs.io/dokku/getting-started/upgrading/) for upgrading from an older version of Dokku. ## Documentation From eb5d4d07085eb54c9e84b74f9a98374f86cefe52 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 16 Jan 2017 15:42:25 -0700 Subject: [PATCH 54/68] docs: move badges to newline [ci skip] --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2ceb0e61b..10fd7bbb8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,10 @@ -# Dokku [![Build Status](https://img.shields.io/circleci/project/dokku/dokku/master.svg?style=flat-square "Build Status")](https://circleci.com/gh/dokku/dokku/tree/master) [![Ubuntu Package](https://img.shields.io/badge/package-ubuntu-brightgreen.svg?style=flat-square "Ubuntu Package")](https://packagecloud.io/dokku/dokku) [![Arch Package](https://img.shields.io/badge/package-arch-brightgreen.svg?style=flat-square "Arch Package")](https://aur.archlinux.org/packages/dokku/) [![IRC Network](https://img.shields.io/badge/irc-freenode-blue.svg?style=flat-square "IRC Freenode")](https://webchat.freenode.net/?channels=dokku) [![Slack Group](https://img.shields.io/badge/irc-slack-blue.svg?style=flat-square "Slack Group")](https://glider-slackin.herokuapp.com/) [![Documentation](https://img.shields.io/badge/docs-viewdocs-blue.svg?style=flat-square "Viewdocs")](http://dokku.viewdocs.io/dokku/) +# Dokku +[![Build Status](https://img.shields.io/circleci/project/dokku/dokku/master.svg?style=flat-square "Build Status")](https://circleci.com/gh/dokku/dokku/tree/master) +[![Ubuntu Package](https://img.shields.io/badge/package-ubuntu-brightgreen.svg?style=flat-square "Ubuntu Package")](https://packagecloud.io/dokku/dokku) +[![Arch Package](https://img.shields.io/badge/package-arch-brightgreen.svg?style=flat-square "Arch Package")](https://aur.archlinux.org/packages/dokku/) +[![IRC Network](https://img.shields.io/badge/irc-freenode-blue.svg?style=flat-square "IRC Freenode")](https://webchat.freenode.net/?channels=dokku) +[![Slack Group](https://img.shields.io/badge/irc-slack-blue.svg?style=flat-square "Slack Group")](https://glider-slackin.herokuapp.com/) +[![Documentation](https://img.shields.io/badge/docs-viewdocs-blue.svg?style=flat-square "Viewdocs")](http://dokku.viewdocs.io/dokku/) [![OpenCollective](https://opencollective.com/dokku/sponsors/badge.svg?style=flat-square)](#sponsors) [![OpenCollective](https://opencollective.com/dokku/backers/badge.svg?style=flat-square)](#backers) [![Gratipay](https://img.shields.io/gratipay/dokku.svg?style=flat-square)](https://gratipay.com/dokku/) From e233e916aafa8837a2e728286a9e00d75450254b Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 16 Jan 2017 15:43:12 -0700 Subject: [PATCH 55/68] docs: move sponsors and backers section up --- README.md | 82 +++++++++++++++++++++++++++---------------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index 10fd7bbb8..5058bf804 100644 --- a/README.md +++ b/README.md @@ -11,47 +11,6 @@ Docker powered mini-Heroku. The smallest PaaS implementation you've ever seen. -## Requirements - -A fresh VM running any of the following operating systems: - -- Ubuntu 16.04 x64 -- Ubuntu 14.04 x64 -- Debian 8.2 x64 -- CentOS 7 x64 *(experimental)* -- Arch Linux x64 *(experimental)* - -## Installation - -To install the latest stable release, run the following commands as a user who has access to `sudo`: - -```shell -wget https://raw.githubusercontent.com/dokku/dokku/v0.8.0/bootstrap.sh -sudo DOKKU_TAG=v0.8.0 bash bootstrap.sh -``` - -You can then proceed to the ip address or domain name associated with your server to complete the web-based installation. - -If you wish for a more unattended installation method, see [these](http://dokku.viewdocs.io/dokku/getting-started/install/debian/#unattended-installation) docs. - -### Upgrade - -[View the docs](http://dokku.viewdocs.io/dokku/getting-started/upgrading/) for upgrading from an older version of Dokku. - -## Documentation - -Full documentation - including advanced installation docs - are available online [here](http://dokku.viewdocs.io/dokku/) - -## Support - -You can use [Github Issues](https://github.com/dokku/dokku/issues), check [Troubleshooting](http://dokku.viewdocs.io/dokku/getting-started/troubleshooting/) in the documentation, or join us on [freenode in #dokku](https://webchat.freenode.net/?channels=%23dokku) - -## Contribution - -After checking [Github Issues](https://github.com/dokku/dokku/issues), the [Troubleshooting Guide](http://dokku.viewdocs.io/dokku/getting-started/troubleshooting/) or having a chat with us on [freenode in #dokku](https://webchat.freenode.net/?channels=%23dokku), feel free to fork and create a Pull Request. - -While we may not merge your PR as is, they serve to start conversations and improve the general Dokku experience for all users. - ## Sponsors See our list of past sponsors in the [SPONSORS](https://github.com/dokku/dokku/blob/master/SPONSORS.md) file. @@ -125,6 +84,47 @@ Support us with a monthly donation and help us continue our activities. [[Become +## Requirements + +A fresh VM running any of the following operating systems: + +- Ubuntu 16.04 x64 +- Ubuntu 14.04 x64 +- Debian 8.2 x64 +- CentOS 7 x64 *(experimental)* +- Arch Linux x64 *(experimental)* + +## Installation + +To install the latest stable release, run the following commands as a user who has access to `sudo`: + +```shell +wget https://raw.githubusercontent.com/dokku/dokku/v0.8.0/bootstrap.sh +sudo DOKKU_TAG=v0.8.0 bash bootstrap.sh +``` + +You can then proceed to the ip address or domain name associated with your server to complete the web-based installation. + +If you wish for a more unattended installation method, see [these](http://dokku.viewdocs.io/dokku/getting-started/install/debian/#unattended-installation) docs. + +### Upgrade + +[View the docs](http://dokku.viewdocs.io/dokku/getting-started/upgrading/) for upgrading from an older version of Dokku. + +## Documentation + +Full documentation - including advanced installation docs - are available online [here](http://dokku.viewdocs.io/dokku/) + +## Support + +You can use [Github Issues](https://github.com/dokku/dokku/issues), check [Troubleshooting](http://dokku.viewdocs.io/dokku/getting-started/troubleshooting/) in the documentation, or join us on [freenode in #dokku](https://webchat.freenode.net/?channels=%23dokku) + +## Contribution + +After checking [Github Issues](https://github.com/dokku/dokku/issues), the [Troubleshooting Guide](http://dokku.viewdocs.io/dokku/getting-started/troubleshooting/) or having a chat with us on [freenode in #dokku](https://webchat.freenode.net/?channels=%23dokku), feel free to fork and create a Pull Request. + +While we may not merge your PR as is, they serve to start conversations and improve the general Dokku experience for all users. + ## License [MIT License](https://github.com/dokku/dokku/blob/master/LICENSE) © Jeff Lindsay From 33c9bc9908b41b9c668611e5d814682207df21d0 Mon Sep 17 00:00:00 2001 From: Edgars Beigarts Date: Wed, 18 Jan 2017 09:25:08 +0200 Subject: [PATCH 56/68] Recommend parallel package for faster ps:restore --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index d88270c1a..a3c7f25dd 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Section: web Priority: optional Architecture: amd64 Depends: locales, git, make, curl, gcc, man-db, sshcommand, gliderlabs-sigil, docker-engine-cs (>= 1.9.1) | docker-engine (>= 1.9.1), software-properties-common, python-software-properties -Recommends: herokuish +Recommends: herokuish, parallel Pre-Depends: nginx, dnsutils, cgroupfs-mount | cgroup-lite, plugn, sudo, python2.7, debconf Maintainer: Jose Diaz-Gonzalez Description: Docker-powered PaaS that helps build and manage the lifecycle of applications From fec2f8e38ea69500c36e4a797f5265a64a1fad3c Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA Date: Fri, 20 Jan 2017 00:26:51 +0900 Subject: [PATCH 57/68] Remove unused variable --- contrib/dokku_client.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/dokku_client.sh b/contrib/dokku_client.sh index 45267ae12..a0a1963cc 100755 --- a/contrib/dokku_client.sh +++ b/contrib/dokku_client.sh @@ -63,7 +63,7 @@ fn-dokku-host() { main() { declare CMD="$1" APP_ARG="$2" local APP="" DOKKU_GIT_REMOTE="dokku" DOKKU_REMOTE_HOST="" - local cmd_set=false arg_set="$2" next_index=1 skip=false args=("$@") + local cmd_set=false next_index=1 skip=false args=("$@") for arg in "$@"; do if [[ "$skip" == "true" ]]; then From bdb38ceaa87c5134821f9a167a1e5f46bb5b296e Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Thu, 19 Jan 2017 17:34:09 -0700 Subject: [PATCH 58/68] Require specific versions for dokku-maintained packages Closes #2450 [ci skip] --- debian/control | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/control b/debian/control index a3c7f25dd..d4ff40970 100644 --- a/debian/control +++ b/debian/control @@ -3,9 +3,9 @@ Version: 0.8.0 Section: web Priority: optional Architecture: amd64 -Depends: locales, git, make, curl, gcc, man-db, sshcommand, gliderlabs-sigil, docker-engine-cs (>= 1.9.1) | docker-engine (>= 1.9.1), software-properties-common, python-software-properties -Recommends: herokuish, parallel -Pre-Depends: nginx, dnsutils, cgroupfs-mount | cgroup-lite, plugn, sudo, python2.7, debconf +Depends: locales, git, make, curl, gcc, man-db, sshcommand (>= 0.6.0), gliderlabs-sigil, docker-engine-cs (>= 1.9.1) | docker-engine (>= 1.9.1), software-properties-common, python-software-properties +Recommends: herokuish (>= 0.3.4), parallel +Pre-Depends: nginx, dnsutils, cgroupfs-mount | cgroup-lite, plugn (>= 0.2.2), sudo, python2.7, debconf Maintainer: Jose Diaz-Gonzalez Description: Docker-powered PaaS that helps build and manage the lifecycle of applications Dokku is an extensible, open source Platform as a Service From 517314565329bc544698e63df78b96db091ccea9 Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA Date: Fri, 20 Jan 2017 23:47:07 +0900 Subject: [PATCH 59/68] Fix font URL It is broken since https://github.com/dokku/dokku/commit/a00a9219dae3921c22538f89751b8ae50b45e930#diff-d93d3d701f4e262a6177c91d4e0b9a36R10 --- docs/home.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/home.html b/docs/home.html index f8f0c65f9..d65794e82 100644 --- a/docs/home.html +++ b/docs/home.html @@ -7,7 +7,7 @@ - + Dokku - The smallest PaaS implementation you've ever seen From a564eae9f16b041befe8d0885bb7cec43e234ade Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 22 Jan 2017 21:39:30 -0700 Subject: [PATCH 60/68] feat: implement application cloning Application cloning can be used to setup review applications based on an existing application. This is useful in CI/CD pipelines where a developer may wish to verify code in a custom environment without overwriting a shared staging environment. --- docs/deployment/application-management.md | 23 +++++++++++++ plugins/apps/commands | 1 + plugins/apps/subcommands/clone | 39 +++++++++++++++++++++++ tests/unit/10_apps.bats | 33 +++++++++++++++++++ 4 files changed, 96 insertions(+) create mode 100755 plugins/apps/subcommands/clone diff --git a/docs/deployment/application-management.md b/docs/deployment/application-management.md index 9b44c3ebc..7f7add379 100644 --- a/docs/deployment/application-management.md +++ b/docs/deployment/application-management.md @@ -4,6 +4,7 @@ ``` apps # List your apps +apps:clone # Clone an app apps:create # Create a new app apps:destroy # Permanently destroy an app apps:rename # Rename an app @@ -112,3 +113,25 @@ Renaming node-js-app to io-js-app... done ``` This will copy all of your app's contents into a new app directory with the name of your choice, delete your old app, then rebuild the new version of the app and deploy it. All of your config variables, including database urls, will be preserved. + +### Cloning an existing app + +> New as of 0.8.1 + +You can clone an existing app using the `apps:clone` command. Note that the application *must* have been deployed at least once, or the rename will not complete successfully: + +```shell +dokku apps:clone node-js-app io-js-app +``` + +``` +Cloning node-js-app to io-js-app... done +``` + +This will copy all of your app's contents into a new app directory with the name of your choice and then rebuild the new version of the app and deploy it. All of your config variables, including database urls, will be preserved. + +By default, Dokku will deploy this new application, though you can skip the deploy by using the `--skip-deploy` flag: + +```shell +dokku apps:clone --skip-deploy node-js-app io-js-app +``` diff --git a/plugins/apps/commands b/plugins/apps/commands index c46d255b1..660d799fb 100755 --- a/plugins/apps/commands +++ b/plugins/apps/commands @@ -8,6 +8,7 @@ case "$1" in declare desc="return apps plugin help content" cat< , Clone an app apps:create , Create a new app apps:destroy , Permanently destroy an app apps:rename , Rename an app diff --git a/plugins/apps/subcommands/clone b/plugins/apps/subcommands/clone new file mode 100755 index 000000000..4f1a4c38d --- /dev/null +++ b/plugins/apps/subcommands/clone @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x +source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" +source "$PLUGIN_AVAILABLE_PATH/apps/functions" +source "$PLUGIN_AVAILABLE_PATH/ps/functions" + +apps_clone_cmd() { + declare desc="renames an app" + declare OLD_APP="$2" NEW_APP="$3" + local cmd="apps:rename" + local SKIP_REBUILD=false + + if [[ "$2" == "--skip-deploy" ]]; then + SKIP_REBUILD=true + OLD_APP="$3" + NEW_APP="$4" + fi + + [[ -z "$OLD_APP" ]] && dokku_log_fail "Please specify an app to run the command on" + [[ -d "$DOKKU_ROOT/$NEW_APP" ]] && dokku_log_fail "Name is already taken" + local NEW_CACHE_DIR="$DOKKU_ROOT/$NEW_APP/cache" + + apps_create "$NEW_APP" + cp -a "$DOKKU_ROOT/$OLD_APP/." "$DOKKU_ROOT/$NEW_APP" + + if [[ -d "$NEW_CACHE_DIR" ]] && ! rmdir "$NEW_CACHE_DIR"; then + docker run "$DOKKU_GLOBAL_RUN_ARGS" --rm -v "$NEW_CACHE_DIR:/cache" "dokku/$OLD_APP" chmod 777 -R /cache + fi + rm -rf "$NEW_CACHE_DIR" + + [[ -f "$DOKKU_ROOT/$NEW_APP/URLS" ]] && sed -i -e "s/$OLD_APP/$NEW_APP/g" "$DOKKU_ROOT/$NEW_APP/URLS" + [[ -f "$DOKKU_ROOT/$NEW_APP/VHOST" ]] && sed -i -e "s/$OLD_APP/$NEW_APP/g" "$DOKKU_ROOT/$NEW_APP/VHOST" + [[ -f "$DOKKU_ROOT/$NEW_APP/hooks/pre-receive" ]] && sed -i -e "s/git-hook $OLD_APP/git-hook $NEW_APP/g" "$DOKKU_ROOT/$NEW_APP/hooks/pre-receive" + [[ "$SKIP_REBUILD" == "false" ]] || ps_rebuild "$NEW_APP" + plugn trigger post-app-clone "$OLD_APP" "$NEW_APP" + echo "Cloning $OLD_APP to $NEW_APP... done" +} + +apps_clone_cmd "$@" diff --git a/tests/unit/10_apps.bats b/tests/unit/10_apps.bats index 9558b3e9b..17ed29be3 100644 --- a/tests/unit/10_apps.bats +++ b/tests/unit/10_apps.bats @@ -90,3 +90,36 @@ teardown () { echo "status: "$status assert_success } + +@test "(apps) apps:clone" { + deploy_app + run bash -c "dokku apps:clone $TEST_APP great-test-name" + echo "output: "$output + echo "status: "$status + assert_success + run bash -c "dokku apps | grep $TEST_APP" + echo "output: "$output + echo "status: "$status + assert_success + run bash -c "curl --silent --write-out '%{http_code}\n' `dokku url great-test-name` | grep 404" + echo "output: "$output + echo "status: "$status + assert_output "" + run bash -c "dokku --force apps:destroy great-test-name" + echo "output: "$output + echo "status: "$status + assert_success + + run bash -c "dokku apps:clone --skip-deploy $TEST_APP great-test-name" + echo "output: "$output + echo "status: "$status + assert_success + run bash -c "curl --silent --write-out '%{http_code}\n' `dokku url great-test-name` | grep 404" + echo "output: "$output + echo "status: "$status + assert_failure + run bash -c "dokku --force apps:destroy great-test-name" + echo "output: "$output + echo "status: "$status + assert_success +} From 143b4802c30274e4f78cd47a6ea2853697c73f1b Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 22 Jan 2017 22:55:09 -0700 Subject: [PATCH 61/68] fix: use correct verb [ci skip] --- plugins/apps/subcommands/clone | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/apps/subcommands/clone b/plugins/apps/subcommands/clone index 4f1a4c38d..565ed13bc 100755 --- a/plugins/apps/subcommands/clone +++ b/plugins/apps/subcommands/clone @@ -5,9 +5,9 @@ source "$PLUGIN_AVAILABLE_PATH/apps/functions" source "$PLUGIN_AVAILABLE_PATH/ps/functions" apps_clone_cmd() { - declare desc="renames an app" + declare desc="clones an app" declare OLD_APP="$2" NEW_APP="$3" - local cmd="apps:rename" + local cmd="apps:clone" local SKIP_REBUILD=false if [[ "$2" == "--skip-deploy" ]]; then From dd517a3dd11a283f82e0aac02e2a5aa9881f4550 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 22 Jan 2017 22:55:28 -0700 Subject: [PATCH 62/68] Update application-management.md [ci skip] --- docs/deployment/application-management.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/deployment/application-management.md b/docs/deployment/application-management.md index 7f7add379..3ee69f6a9 100644 --- a/docs/deployment/application-management.md +++ b/docs/deployment/application-management.md @@ -4,7 +4,7 @@ ``` apps # List your apps -apps:clone # Clone an app +apps:clone # Clones an app apps:create # Create a new app apps:destroy # Permanently destroy an app apps:rename # Rename an app From 33a7619eac98b6ecba0504c61a537daa8bbc5d1f Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 22 Jan 2017 22:55:40 -0700 Subject: [PATCH 63/68] Update commands [ci skip] --- plugins/apps/commands | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/apps/commands b/plugins/apps/commands index 660d799fb..234108cdf 100755 --- a/plugins/apps/commands +++ b/plugins/apps/commands @@ -8,7 +8,7 @@ case "$1" in declare desc="return apps plugin help content" cat< , Clone an app + apps:clone , Clones an app apps:create , Create a new app apps:destroy , Permanently destroy an app apps:rename , Rename an app From d473c1635fbb4faf5ac0f941843c17689a8b3173 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 23 Jan 2017 12:03:16 -0700 Subject: [PATCH 64/68] docs: add a note about errors that can occur for non-generic config [ci skip] --- docs/deployment/application-management.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/deployment/application-management.md b/docs/deployment/application-management.md index 3ee69f6a9..1ddf5715a 100644 --- a/docs/deployment/application-management.md +++ b/docs/deployment/application-management.md @@ -130,6 +130,8 @@ Cloning node-js-app to io-js-app... done This will copy all of your app's contents into a new app directory with the name of your choice and then rebuild the new version of the app and deploy it. All of your config variables, including database urls, will be preserved. +> Warning: If you have exposed specific ports via docker-options, added generic domains, or performed anything that cannot be done against multiple applications, `apps:clone` may result in errors. + By default, Dokku will deploy this new application, though you can skip the deploy by using the `--skip-deploy` flag: ```shell From c82c9562b633063510987936c7381c02a6ffca3f Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Tue, 24 Jan 2017 02:54:26 -0700 Subject: [PATCH 65/68] fix: use correct check for skipping a rebuild --- plugins/apps/subcommands/clone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/apps/subcommands/clone b/plugins/apps/subcommands/clone index 565ed13bc..829882c2c 100755 --- a/plugins/apps/subcommands/clone +++ b/plugins/apps/subcommands/clone @@ -31,7 +31,7 @@ apps_clone_cmd() { [[ -f "$DOKKU_ROOT/$NEW_APP/URLS" ]] && sed -i -e "s/$OLD_APP/$NEW_APP/g" "$DOKKU_ROOT/$NEW_APP/URLS" [[ -f "$DOKKU_ROOT/$NEW_APP/VHOST" ]] && sed -i -e "s/$OLD_APP/$NEW_APP/g" "$DOKKU_ROOT/$NEW_APP/VHOST" [[ -f "$DOKKU_ROOT/$NEW_APP/hooks/pre-receive" ]] && sed -i -e "s/git-hook $OLD_APP/git-hook $NEW_APP/g" "$DOKKU_ROOT/$NEW_APP/hooks/pre-receive" - [[ "$SKIP_REBUILD" == "false" ]] || ps_rebuild "$NEW_APP" + [[ "$SKIP_REBUILD" == "true" ]] || ps_rebuild "$NEW_APP" plugn trigger post-app-clone "$OLD_APP" "$NEW_APP" echo "Cloning $OLD_APP to $NEW_APP... done" } From 0aeee7ea28d7678f45be7fa5708fb91a5c21a108 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Thu, 26 Jan 2017 00:32:23 -0700 Subject: [PATCH 66/68] Allow specifying the deploy branch via DOKKU_DEPLOY_BRANCH Closes #2494 --- docs/deployment/application-deployment.md | 12 ++++++++++ plugins/git/functions | 27 +++++++++++++++++++++-- tests/unit/20_config.bats | 14 ++++++++++++ tests/unit/test_helper.bash | 11 ++++----- 4 files changed, 57 insertions(+), 7 deletions(-) diff --git a/docs/deployment/application-deployment.md b/docs/deployment/application-deployment.md index 903add341..c8f0d2e9a 100644 --- a/docs/deployment/application-deployment.md +++ b/docs/deployment/application-deployment.md @@ -90,6 +90,18 @@ Dokku supports deploying applications via [Heroku buildpacks](https://devcenter. Dokku only supports deploying from its master branch, so if you'd like to deploy a different local branch use: ```git push dokku :master``` +An alternative is to use the `DOKKU_DEPLOY_BRANCH` application config value to specify a branch that should be deployed. The implicit default is master, and this can be modified both at the app and global level: + +```shell +# on your Dokku host + +# set it globally +dokku config:set --global DOKKU_DEPLOY_BRANCH=some-branch + +# override for a specific app +dokku config:set ruby-rails-sample DOKKU_DEPLOY_BRANCH=some-branch +``` + You can also support pushing multiple branches using the [receive-branch](/dokku/development/plugin-triggers/#receive-branch) plugin trigger in a custom plugin. ### Skipping deployment diff --git a/plugins/git/functions b/plugins/git/functions index 96ce9b9aa..5e0da3726 100755 --- a/plugins/git/functions +++ b/plugins/git/functions @@ -55,16 +55,39 @@ suppress_output() { return 0 } +git_deploy_branch() { + declare desc="retrieve the deploy branch for a given application" + local cmd="git-hook" + local APP="$1" + + local DOKKU_DEPLOY_BRANCH="$(config_get "$APP" DOKKU_DEPLOY_BRANCH || true)" + local DOKKU_GLOBAL_DEPLOY_BRANCH="$(config_get --global DOKKU_DEPLOY_BRANCH || true)" + if [[ -n "$DOKKU_DEPLOY_BRANCH" ]]; then + echo "$DOKKU_DEPLOY_BRANCH" + elif [[ -n "$DOKKU_GLOBAL_DEPLOY_BRANCH" ]]; then + echo "$DOKKU_GLOBAL_DEPLOY_BRANCH" + else + echo "master" + fi +} + git_hook_cmd() { declare desc="kick off receive-app trigger from git prereceive hook" local cmd="git-hook" - local APP="$2" + local APP="$2" + local DOKKU_DEPLOY_BRANCH="$(git_deploy_branch "$APP")" + + if ! git check-ref-format --branch "$DOKKU_DEPLOY_BRANCH" 2> /dev/null; then + echo $'\e[1G\e[K'"-----> WARNING: Invalid branch name '$DOKKU_DEPLOY_BRANCH' specified via DOKKU_DEPLOY_BRANCH." + echo $'\e[1G\e[K'"-----> For more details, please see the man page for 'git-check-ref-format.'" + return + fi local oldrev newrev refname while read -r oldrev newrev refname; do # Only run this script for the master branch. You can remove this # if block if you wish to run it for others as well. - if [[ $refname = "refs/heads/master" ]]; then + if [[ $refname = "refs/heads/${DOKKU_DEPLOY_BRANCH}" ]]; then # broken out into plugin so we might support other methods to receive an app # shellcheck disable=SC2086 plugn trigger receive-app $APP $newrev diff --git a/tests/unit/20_config.bats b/tests/unit/20_config.bats index a5894372c..87dafa332 100644 --- a/tests/unit/20_config.bats +++ b/tests/unit/20_config.bats @@ -145,3 +145,17 @@ teardown() { echo "status: "$status assert_success } + +@test "(config) deploy specific DOKKU_DEPLOY_BRANCH" { + run ssh dokku@dokku.me config:set --global DOKKU_DEPLOY_BRANCH=global-branch + GIT_REMOTE_BRANCH=global-branch deploy_app + echo "output: "$output + echo "status: "$status + assert_success + + run ssh dokku@dokku.me config:set $TEST_APP DOKKU_DEPLOY_BRANCH=app-branch + GIT_REMOTE_BRANCH=app-branch deploy_app + echo "output: "$output + echo "status: "$status + assert_success +} diff --git a/tests/unit/test_helper.bash b/tests/unit/test_helper.bash index e6d16da86..b59841339 100644 --- a/tests/unit/test_helper.bash +++ b/tests/unit/test_helper.bash @@ -196,10 +196,11 @@ assert_http_redirect() { } deploy_app() { - local APP_TYPE="$1"; local APP_TYPE=${APP_TYPE:="nodejs-express"} - local GIT_REMOTE="$2"; local GIT_REMOTE=${GIT_REMOTE:="dokku@dokku.me:$TEST_APP"} - local CUSTOM_TEMPLATE="$3"; local TMP=$(mktemp -d "/tmp/dokku.me.XXXXX") - local CUSTOM_PATH="$4" + declare APP_TYPE="$1" GIT_REMOTE="$2" CUSTOM_TEMPLATE="$3" CUSTOM_PATH="$4" + local APP_TYPE=${APP_TYPE:="nodejs-express"} + local GIT_REMOTE=${GIT_REMOTE:="dokku@dokku.me:$TEST_APP"} + local GIT_REMOTE_BRANCH=${GIT_REMOTE_BRANCH:="master"} + local TMP=$(mktemp -d "/tmp/dokku.me.XXXXX") rmdir "$TMP" && cp -r "./tests/apps/$APP_TYPE" "$TMP" @@ -218,7 +219,7 @@ deploy_app() { [[ -f gitignore ]] && mv gitignore .gitignore git add . git commit -m 'initial commit' - git push target master || destroy_app $? + git push target "master:${GIT_REMOTE_BRANCH}" || destroy_app $? } setup_client_repo() { From 7cac755c988d3fa4b6ec3f4281cc0c6025e7b20c Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Thu, 26 Jan 2017 00:46:35 -0700 Subject: [PATCH 67/68] Clarify when the `~/.ssh/config` settings need to match `vagrant ssh-config` output Closes #2466 [ci skip] --- docs/getting-started/install/vagrant.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/getting-started/install/vagrant.md b/docs/getting-started/install/vagrant.md index d6116be84..b6f79c7b0 100644 --- a/docs/getting-started/install/vagrant.md +++ b/docs/getting-started/install/vagrant.md @@ -21,13 +21,15 @@ cd path/to/dokku vagrant up ``` -- Setup SSH Config in `~/.ssh/config`. The port listed here is usually correct, though you may want to verify that it is the same as the one listed in the output of `vagrant ssh-config dokku` +- Setup SSH Config in `~/.ssh/config`. ```ini Host dokku.me Port 22 ``` + > For users that have customized the IP address of their VM - either in a custom `Vagrantfile` or via the `DOKKU_IP` environment variable - and are not using `10.0.0.2` for the Vagrant IP, you'll need to instead use the output of `vagrant ssh-config dokku` for your ~/.ssh/config entry. + - Copy your SSH key via `cat ~/.ssh/id_rsa.pub | pbcopy` and paste it into the dokku-installer at http://dokku.me . Change the `Hostname` field on the Dokku Setup screen to your domain and then check the box that says `Use virtualhost naming`. Then click *Finish Setup* to install your key. You'll be directed to application deployment instructions from here. Please note, the `dokku.me` domain is setup to point to `10.0.0.2` along with all subdomains (ie yourapp.dokku.me). If you change the `DOKKU_IP` in your vagrant setup you'll need to update your `/etc/hosts` file to point your reconfigured ip address. From 0de2c28c92c92874b45e5fa4ccc959fbb2750924 Mon Sep 17 00:00:00 2001 From: Michael Hobbs Date: Wed, 1 Feb 2017 11:52:19 -0800 Subject: [PATCH 68/68] upgrade to herokuish v0.3.25 --- deb.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deb.mk b/deb.mk index eac9a9ced..ca8411157 100644 --- a/deb.mk +++ b/deb.mk @@ -1,6 +1,6 @@ HEROKUISH_DESCRIPTION = 'Herokuish uses Docker and Buildpacks to build applications like Heroku' HEROKUISH_REPO_NAME ?= gliderlabs/herokuish -HEROKUISH_VERSION ?= 0.3.24 +HEROKUISH_VERSION ?= 0.3.25 HEROKUISH_ARCHITECTURE = amd64 HEROKUISH_PACKAGE_NAME = herokuish_$(HEROKUISH_VERSION)_$(HEROKUISH_ARCHITECTURE).deb