From 60f29cdb18a0831fdf65ce3e919b3bb6d5c2c1c7 Mon Sep 17 00:00:00 2001 From: Jeff Lindsay Date: Sun, 30 Jun 2013 15:51:41 -0500 Subject: [PATCH] adding some basic help, also as another example of using plugin hooks --- dokku | 14 ++++++++++++-- plugins/00_dokku-standard/commands | 7 +++++++ plugins/nginx-vhosts/commands | 3 +++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/dokku b/dokku index bff2b2519..b0cbd3e7b 100755 --- a/dokku +++ b/dokku @@ -1,12 +1,12 @@ #!/bin/bash set -e -export PLUGIN_PATH="/var/lib/dokku/plugins" +export PLUGIN_PATH=${PLUGIN_PATH:="/var/lib/dokku/plugins"} case "$1" in receive) APP="$2"; IMAGE="app/$APP" echo "-----> Building $APP ..." cat | dokku build $IMAGE - echo "=====> Build complete!" + echo "-----> Build complete!" echo "-----> Deploying $APP ..." dokku deploy $APP $IMAGE echo "=====> Application deployed:" @@ -45,6 +45,16 @@ case "$1" in pluginhook post-deploy $APP $port ;; + plugins) ls -1 -d $PLUGIN_PATH/*/ + ;; + + help) + cat< Show the last logs for an application + url Show the URL for an application +EOF + ;; esac \ No newline at end of file diff --git a/plugins/nginx-vhosts/commands b/plugins/nginx-vhosts/commands index 6c958587e..c3a438c1a 100755 --- a/plugins/nginx-vhosts/commands +++ b/plugins/nginx-vhosts/commands @@ -8,5 +8,8 @@ set -e; case "$1" in cat fi ;; + + help) cat + ;; esac \ No newline at end of file