adding some basic help, also as another example of using plugin hooks
This commit is contained in:
14
dokku
14
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<<EOF | pluginhook commands help | sort
|
||||
help Print the list of commands
|
||||
plugins Print active plugins
|
||||
EOF
|
||||
;;
|
||||
|
||||
*)
|
||||
pluginhook commands "$@"
|
||||
;;
|
||||
|
||||
@@ -8,5 +8,12 @@ set -e; case "$1" in
|
||||
url)
|
||||
echo "http://$(< "/home/git/$2/ADDRESS")"
|
||||
;;
|
||||
|
||||
help)
|
||||
cat && cat<<EOF
|
||||
logs <app> Show the last logs for an application
|
||||
url <app> Show the URL for an application
|
||||
EOF
|
||||
;;
|
||||
|
||||
esac
|
||||
@@ -8,5 +8,8 @@ set -e; case "$1" in
|
||||
cat
|
||||
fi
|
||||
;;
|
||||
|
||||
help) cat
|
||||
;;
|
||||
|
||||
esac
|
||||
Reference in New Issue
Block a user