Enable tracing in hooks when DOKKU_TRACE is set.

This makes it much easier to debug plugins.
Also source the 'dokkurc' file when starting dokku. This makes it easy
to define DOKKU_TRACE over ssh.
This commit is contained in:
Paul Lietar committed 2013-11-18 20:59:48 +00:00
1 parent 805c5a27c6
commit 83ce81fc51
10 files changed
+15 -11

No files matched your search

+6 -2
View File
@@ -1,7 +1,11 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x set -eo pipefail
export PLUGIN_PATH=${PLUGIN_PATH:="/var/lib/dokku/plugins"}
export DOKKU_ROOT=${DOKKU_ROOT:="/home/dokku"} export DOKKU_ROOT=${DOKKU_ROOT:="/home/dokku"}
export PLUGIN_PATH=${PLUGIN_PATH:="/var/lib/dokku/plugins"}
[[ -f $DOKKU_ROOT/dokkurc ]] && source $DOKKU_ROOT/dokkurc
[[ $DOKKU_TRACE ]] && set -x
case "$1" in case "$1" in
receive) receive)
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -eo pipefail set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
case "$1" in case "$1" in
delete) delete)
if [[ -z $2 ]]; then if [[ -z $2 ]]; then
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -eo pipefail set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
sed -i 's/docker -d$/docker -d -r=true/' /etc/init/docker.conf sed -i 's/docker -d$/docker -d -r=true/' /etc/init/docker.conf
+1 -1
View File
@@ -1,3 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -eo pipefail set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
[[ -n $1 ]] && rm -r "$DOKKU_ROOT/$1" > /dev/null [[ -n $1 ]] && rm -r "$DOKKU_ROOT/$1" > /dev/null
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -eo pipefail set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
# Check if name is specified # Check if name is specified
if [[ $1 == config ]] || [[ $1 == config:* ]]; then if [[ $1 == config ]] || [[ $1 == config:* ]]; then
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -eo pipefail set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
case "$1" in case "$1" in
git-hook) git-hook)
+1 -1
View File
@@ -1,3 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -eo pipefail set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
cat cat
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -eo pipefail set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
# latest stable NGINX 1.4.x with websocket support # latest stable NGINX 1.4.x with websocket support
add-apt-repository -y ppa:nginx/stable add-apt-repository -y ppa:nginx/stable
+1 -1
View File
@@ -1,3 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -eo pipefail set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
sudo /etc/init.d/nginx reload > /dev/null sudo /etc/init.d/nginx reload > /dev/null
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -eo pipefail set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
APP="$1"; PORT="$2" APP="$1"; PORT="$2"
WILDCARD_SSL="$DOKKU_ROOT/ssl" WILDCARD_SSL="$DOKKU_ROOT/ssl"
SSL="$DOKKU_ROOT/$APP/ssl" SSL="$DOKKU_ROOT/$APP/ssl"