Merge pull request #664 from alexernst/fix/hostname-url
Don't overwrite $APP/URL modified by plugins in post-deploy hook
This commit is contained in:
commit
16095d0d79
1 file changed
+4
-3
@@ -77,15 +77,16 @@ case "$1" in
|
|||||||
trap kill_new INT TERM EXIT
|
trap kill_new INT TERM EXIT
|
||||||
echo "-----> Running pre-flight checks"
|
echo "-----> Running pre-flight checks"
|
||||||
pluginhook check-deploy $id $APP $port
|
pluginhook check-deploy $id $APP $port
|
||||||
echo "-----> Running post-deploy"
|
|
||||||
pluginhook post-deploy $APP $port
|
|
||||||
trap - INT TERM EXIT
|
|
||||||
|
|
||||||
# now using the new container
|
# now using the new container
|
||||||
echo $id > "$DOKKU_ROOT/$APP/CONTAINER"
|
echo $id > "$DOKKU_ROOT/$APP/CONTAINER"
|
||||||
echo $port > "$DOKKU_ROOT/$APP/PORT"
|
echo $port > "$DOKKU_ROOT/$APP/PORT"
|
||||||
echo "http://$(< "$DOKKU_ROOT/HOSTNAME"):$port" > "$DOKKU_ROOT/$APP/URL"
|
echo "http://$(< "$DOKKU_ROOT/HOSTNAME"):$port" > "$DOKKU_ROOT/$APP/URL"
|
||||||
|
|
||||||
|
echo "-----> Running post-deploy"
|
||||||
|
pluginhook post-deploy $APP $port
|
||||||
|
trap - INT TERM EXIT
|
||||||
|
|
||||||
# kill the old container
|
# kill the old container
|
||||||
if [[ -n "$oldid" ]]; then
|
if [[ -n "$oldid" ]]; then
|
||||||
docker inspect $oldid &> /dev/null && docker kill $oldid > /dev/null
|
docker inspect $oldid &> /dev/null && docker kill $oldid > /dev/null
|
||||||
|
|||||||
Reference in new issue
Block a user