@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
|
||||
print_dokku_scale_file() {
|
||||
declare desc="prints contents of DOKKU_SCALE file"
|
||||
@@ -107,9 +108,12 @@ ps_stop() {
|
||||
! (is_deployed "$APP") && echo "App $APP has not been deployed" && exit 0
|
||||
|
||||
if [[ -n "$DOKKU_APP_RUNNING_CONTAINER_IDS" ]]; then
|
||||
local DOKKU_DOCKER_STOP_TIMEOUT="$(config_get "$APP" DOKKU_DOCKER_STOP_TIMEOUT || true)"
|
||||
[[ $DOKKU_DOCKER_STOP_TIMEOUT ]] && DOCKER_STOP_TIME_ARG="--time=${DOKKU_DOCKER_STOP_TIMEOUT}"
|
||||
|
||||
echo "Stopping $APP ..."
|
||||
# shellcheck disable=SC2086
|
||||
docker stop $DOKKU_APP_RUNNING_CONTAINER_IDS > /dev/null || true
|
||||
docker stop $DOCKER_STOP_TIME_ARG $DOKKU_APP_RUNNING_CONTAINER_IDS > /dev/null || true
|
||||
plugn trigger post-stop "$APP"
|
||||
else
|
||||
echo "App $APP already stopped"
|
||||
|
||||
Reference in New Issue
Block a user