mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
allow DOKKU_WAIT_TO_RETIRE to be defined per app. closes #1258
This commit is contained in:
7
dokku
7
dokku
@@ -167,6 +167,13 @@ case "$1" in
|
||||
|
||||
# kill the old container
|
||||
if [[ -n "$oldids" ]]; then
|
||||
|
||||
if [[ -z "$DOKKU_WAIT_TO_RETIRE" ]];then
|
||||
DOKKU_APP_DOKKU_WAIT_TO_RETIRE=$(dokku config:get $APP DOKKU_WAIT_TO_RETIRE || true)
|
||||
DOKKU_GLOBAL_DOKKU_WAIT_TO_RETIRE=$(dokku config:get --global DOKKU_WAIT_TO_RETIRE || true)
|
||||
DOKKU_WAIT_TO_RETIRE=${DOKKU_APP_DOKKU_WAIT_TO_RETIRE:="$DOKKU_GLOBAL_DOKKU_WAIT_TO_RETIRE"}
|
||||
fi
|
||||
|
||||
# Let the old container finish processing requests, before terminating it
|
||||
WAIT="${DOKKU_WAIT_TO_RETIRE:-60}"
|
||||
dokku_log_info1 "Shutting down old containers in $WAIT seconds"
|
||||
|
||||
Reference in New Issue
Block a user