Add dokku run-cli command to run commands in the app env

This commit is contained in:
Alexander committed 2013-08-18 14:30:16 +02:00
1 parent 4b5b86173f
commit c773e52508
1 file changed
+14
+14
View File
@@ -5,6 +5,20 @@ set -e; case "$1" in
docker logs $CONTAINER | tail -n 100 docker logs $CONTAINER | tail -n 100
;; ;;
run-cli)
if [[ -z $2 ]]; then
echo "Please specify an app to run the command on"
exit 1
fi
APP="$2"; IMAGE="app/$APP"
if [[ ! -d "/home/git/$APP" ]]; then
echo "App $APP does not exist"
exit 1
fi
shift 2
docker run $IMAGE /run-cli "$@"
;;
help) help)
cat && cat<<EOF cat && cat<<EOF
logs <app> Show the last logs for an application logs <app> Show the last logs for an application