diff --git a/dokku b/dokku index cd837fe90..ddd8a05b0 100755 --- a/dokku +++ b/dokku @@ -94,7 +94,18 @@ case "$1" in # kill the old container if [[ -n "$oldid" ]]; then - docker inspect $oldid &> /dev/null && docker kill $oldid > /dev/null + # Let the old container finish processing requests, before terminating it + WAIT="${DOKKU_WAIT_TO_RETIRE:-60}" + echo "-----> Shutting down old container in $WAIT seconds" + ( + exec >/dev/null 2>/dev/null