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
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
export PLUGIN_PATH="/var/lib/dokku/plugins"
|
export PLUGIN_PATH=${PLUGIN_PATH:="/var/lib/dokku/plugins"}
|
||||||
case "$1" in
|
case "$1" in
|
||||||
receive)
|
receive)
|
||||||
APP="$2"; IMAGE="app/$APP"
|
APP="$2"; IMAGE="app/$APP"
|
||||||
echo "-----> Building $APP ..."
|
echo "-----> Building $APP ..."
|
||||||
cat | dokku build $IMAGE
|
cat | dokku build $IMAGE
|
||||||
echo "=====> Build complete!"
|
echo "-----> Build complete!"
|
||||||
echo "-----> Deploying $APP ..."
|
echo "-----> Deploying $APP ..."
|
||||||
dokku deploy $APP $IMAGE
|
dokku deploy $APP $IMAGE
|
||||||
echo "=====> Application deployed:"
|
echo "=====> Application deployed:"
|
||||||
@@ -45,6 +45,16 @@ case "$1" in
|
|||||||
pluginhook post-deploy $APP $port
|
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 "$@"
|
pluginhook commands "$@"
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -9,4 +9,11 @@ set -e; case "$1" in
|
|||||||
echo "http://$(< "/home/git/$2/ADDRESS")"
|
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
|
esac
|
||||||
@@ -9,4 +9,7 @@ set -e; case "$1" in
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
help) cat
|
||||||
|
;;
|
||||||
|
|
||||||
esac
|
esac
|
||||||
Reference in New Issue
Block a user