Add pre-deploy hook

Adds a pre-deploy hook passing the name of the app and the image. The
hook allows plugins to setup external resources (such as databases) and
modify the image (running pre-deployment script from the app) before the
application is deployed by dokku.
This commit is contained in:
Alexander
2013-07-01 13:54:34 +02:00
parent 0b07e4e4e3
commit cf7a2a00d4

1
dokku
View File

@@ -27,6 +27,7 @@ case "$1" in
deploy)
APP="$2"; IMAGE="$3"
pluginhook pre-deploy $APP $IMAGE
if [[ ! -f "$HOME/$APP/PORT" ]]; then
# First deploy
id=$(docker run -d -p 5000 -e PORT=5000 $IMAGE /bin/bash -c "/start web")