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:
1
dokku
1
dokku
@@ -27,6 +27,7 @@ case "$1" in
|
|||||||
|
|
||||||
deploy)
|
deploy)
|
||||||
APP="$2"; IMAGE="$3"
|
APP="$2"; IMAGE="$3"
|
||||||
|
pluginhook pre-deploy $APP $IMAGE
|
||||||
if [[ ! -f "$HOME/$APP/PORT" ]]; then
|
if [[ ! -f "$HOME/$APP/PORT" ]]; then
|
||||||
# First deploy
|
# First deploy
|
||||||
id=$(docker run -d -p 5000 -e PORT=5000 $IMAGE /bin/bash -c "/start web")
|
id=$(docker run -d -p 5000 -e PORT=5000 $IMAGE /bin/bash -c "/start web")
|
||||||
|
|||||||
Reference in New Issue
Block a user