mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
@@ -47,7 +47,7 @@ execute_script() {
|
||||
return
|
||||
fi
|
||||
|
||||
dokku_log_info1 "Running '$SCRIPT_CMD' in app container"
|
||||
dokku_log_exclaim "${PHASE_SCRIPT_KEY^} command declared: '$SCRIPT_CMD'"
|
||||
local COMMAND
|
||||
COMMAND="set -eo pipefail; [[ \$DOKKU_TRACE ]] && set -x ; "
|
||||
COMMAND+=" if [[ -d '/app' ]]; then "
|
||||
@@ -58,7 +58,6 @@ execute_script() {
|
||||
COMMAND+=" for file in /app/.profile.d/*; do source \$file; done ; "
|
||||
COMMAND+=" fi ; "
|
||||
COMMAND+=" if [[ -d '/cache' ]]; then "
|
||||
COMMAND+=" echo restoring installation cache... ; "
|
||||
COMMAND+=" rm -rf /tmp/cache ; "
|
||||
COMMAND+=" ln -sf /cache /tmp/cache ; "
|
||||
COMMAND+=" fi ; "
|
||||
@@ -73,7 +72,6 @@ execute_script() {
|
||||
|
||||
COMMAND+=" $SCRIPT_CMD || exit 1;"
|
||||
COMMAND+=" if [[ -d '/cache' ]]; then "
|
||||
COMMAND+=" echo removing installation cache... ; "
|
||||
COMMAND+=" rm -f /tmp/cache ; "
|
||||
COMMAND+=" fi ; "
|
||||
|
||||
|
||||
@@ -22,16 +22,16 @@ migrate_checks_vars_0_5_0() {
|
||||
dokku_log_info2 "Please use dokku checks:[disable|enable] <app> to control zero downtime functionality"
|
||||
dokku_log_info2 ""
|
||||
dokku_log_info2 "zero downtime checks disabled for app ($app)"
|
||||
config_set --no-restart "$app" DOKKU_CHECKS_ENABLED=0
|
||||
DOKKU_QUIET_OUTPUT=1 config_set --no-restart "$app" DOKKU_CHECKS_ENABLED=0
|
||||
fi
|
||||
if [[ -n "$APP_SKIP_ALL_CHECKS" ]] || [[ -n "$APP_SKIP_DEFAULT_CHECKS" ]]; then
|
||||
config_unset --no-restart "$app" DOKKU_SKIP_ALL_CHECKS DOKKU_SKIP_DEFAULT_CHECKS
|
||||
DOKKU_QUIET_OUTPUT=1 config_unset --no-restart "$app" DOKKU_SKIP_ALL_CHECKS DOKKU_SKIP_DEFAULT_CHECKS
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -n "$GLOBAL_SKIP_ALL_CHECKS" ]] || [[ -n "$GLOBAL_SKIP_DEFAULT_CHECKS" ]]; then
|
||||
dokku_log_info1 "Removing global zero downtime settings"
|
||||
config_unset --global DOKKU_SKIP_ALL_CHECKS DOKKU_SKIP_DEFAULT_CHECKS
|
||||
DOKKU_QUIET_OUTPUT=1 config_unset --global DOKKU_SKIP_ALL_CHECKS DOKKU_SKIP_DEFAULT_CHECKS
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -49,9 +49,9 @@ migrate_checks_vars_0_6_0() {
|
||||
if [[ "$APP_DOKKU_CHECKS_ENABLED" == "0" ]]; then
|
||||
dokku_log_info2 ""
|
||||
dokku_log_info2 "zero downtime checks disabled for app ($app)"
|
||||
config_set --no-restart "$app" DOKKU_CHECKS_SKIPPED="_all_"
|
||||
DOKKU_QUIET_OUTPUT=1 config_set --no-restart "$app" DOKKU_CHECKS_SKIPPED="_all_"
|
||||
fi
|
||||
config_unset --no-restart "$app" DOKKU_CHECKS_ENABLED || true
|
||||
DOKKU_QUIET_OUTPUT=1 config_unset --no-restart "$app" DOKKU_CHECKS_ENABLED || true
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
@@ -16,8 +16,8 @@ checks_disable_cmd() {
|
||||
|
||||
if [[ "$PROCTYPES" == "_all_" ]]; then
|
||||
dokku_log_info1 "Disabling zero downtime for app ($APP)"
|
||||
config_set --no-restart "$APP" DOKKU_CHECKS_DISABLED="$PROCTYPES"
|
||||
config_unset --no-restart "$APP" DOKKU_CHECKS_SKIPPED
|
||||
DOKKU_QUIET_OUTPUT=1 config_set --no-restart "$APP" DOKKU_CHECKS_DISABLED="$PROCTYPES"
|
||||
DOKKU_QUIET_OUTPUT=1 config_unset --no-restart "$APP" DOKKU_CHECKS_SKIPPED
|
||||
else
|
||||
dokku_log_info1 "Disabling zero downtime for app's ($APP) proctypes ($PROCTYPES)"
|
||||
local PROCTYPE OIFS="$IFS" IFS=,
|
||||
@@ -30,15 +30,15 @@ checks_disable_cmd() {
|
||||
done
|
||||
DOKKU_CHECKS_DISABLED="$(remove_val_from_list "_all_" "$DOKKU_CHECKS_DISABLED")"
|
||||
if [[ -z "$DOKKU_CHECKS_DISABLED" ]]; then
|
||||
config_unset --no-restart "$APP" DOKKU_CHECKS_DISABLED
|
||||
DOKKU_QUIET_OUTPUT=1 config_unset --no-restart "$APP" DOKKU_CHECKS_DISABLED
|
||||
else
|
||||
config_set --no-restart "$APP" DOKKU_CHECKS_DISABLED="$DOKKU_CHECKS_DISABLED"
|
||||
DOKKU_QUIET_OUTPUT=1 config_set --no-restart "$APP" DOKKU_CHECKS_DISABLED="$DOKKU_CHECKS_DISABLED"
|
||||
fi
|
||||
|
||||
if [[ -z "$DOKKU_CHECKS_SKIPPED" ]]; then
|
||||
config_unset --no-restart "$APP" DOKKU_CHECKS_SKIPPED
|
||||
DOKKU_QUIET_OUTPUT=1 config_unset --no-restart "$APP" DOKKU_CHECKS_SKIPPED
|
||||
else
|
||||
config_set --no-restart "$APP" DOKKU_CHECKS_SKIPPED="$DOKKU_CHECKS_SKIPPED"
|
||||
DOKKU_QUIET_OUTPUT=1 config_set --no-restart "$APP" DOKKU_CHECKS_SKIPPED="$DOKKU_CHECKS_SKIPPED"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@ checks_enable_cmd() {
|
||||
|
||||
if [[ "$PROCTYPES" == "_all_" ]]; then
|
||||
dokku_log_info1 "Enabling zero downtime for app's ($APP)"
|
||||
config_unset --no-restart "$APP" DOKKU_CHECKS_DISABLED
|
||||
config_unset --no-restart "$APP" DOKKU_CHECKS_SKIPPED
|
||||
DOKKU_QUIET_OUTPUT=1 config_unset --no-restart "$APP" DOKKU_CHECKS_DISABLED
|
||||
DOKKU_QUIET_OUTPUT=1 config_unset --no-restart "$APP" DOKKU_CHECKS_SKIPPED
|
||||
else
|
||||
dokku_log_info1 "Enabling zero downtime for app's ($APP) proctypes ($PROCTYPES)"
|
||||
local PROCTYPE OIFS="$IFS" IFS=,
|
||||
@@ -29,15 +29,15 @@ checks_enable_cmd() {
|
||||
|
||||
IFS="$OIFS"
|
||||
if [[ -z "$DOKKU_CHECKS_DISABLED" ]]; then
|
||||
config_unset --no-restart "$APP" DOKKU_CHECKS_DISABLED
|
||||
DOKKU_QUIET_OUTPUT=1 config_unset --no-restart "$APP" DOKKU_CHECKS_DISABLED
|
||||
else
|
||||
config_set --no-restart "$APP" DOKKU_CHECKS_DISABLED="$DOKKU_CHECKS_DISABLED"
|
||||
DOKKU_QUIET_OUTPUT=1 config_set --no-restart "$APP" DOKKU_CHECKS_DISABLED="$DOKKU_CHECKS_DISABLED"
|
||||
fi
|
||||
|
||||
if [[ -z "$DOKKU_CHECKS_SKIPPED" ]]; then
|
||||
config_unset --no-restart "$APP" DOKKU_CHECKS_SKIPPED
|
||||
DOKKU_QUIET_OUTPUT=1 config_unset --no-restart "$APP" DOKKU_CHECKS_SKIPPED
|
||||
else
|
||||
config_set --no-restart "$APP" DOKKU_CHECKS_SKIPPED="$DOKKU_CHECKS_SKIPPED"
|
||||
DOKKU_QUIET_OUTPUT=1 config_set --no-restart "$APP" DOKKU_CHECKS_SKIPPED="$DOKKU_CHECKS_SKIPPED"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -16,8 +16,8 @@ checks_skip_cmd() {
|
||||
|
||||
if [[ "$PROCTYPES" == "_all_" ]]; then
|
||||
dokku_log_info1 "Skipping zero downtime for app ($APP)"
|
||||
config_set --no-restart "$APP" DOKKU_CHECKS_SKIPPED="$PROCTYPES"
|
||||
config_unset --no-restart "$APP" DOKKU_CHECKS_DISABLED
|
||||
DOKKU_QUIET_OUTPUT=1 config_set --no-restart "$APP" DOKKU_CHECKS_SKIPPED="$PROCTYPES"
|
||||
DOKKU_QUIET_OUTPUT=1 config_unset --no-restart "$APP" DOKKU_CHECKS_DISABLED
|
||||
else
|
||||
dokku_log_info1 "Skipping zero downtime for app's ($APP) proctypes ($PROCTYPES)"
|
||||
local PROCTYPE OIFS="$IFS" IFS=,
|
||||
@@ -30,15 +30,15 @@ checks_skip_cmd() {
|
||||
done
|
||||
DOKKU_CHECKS_SKIPPED="$(remove_val_from_list "_all_" "$DOKKU_CHECKS_SKIPPED")"
|
||||
if [[ -z "$DOKKU_CHECKS_DISABLED" ]]; then
|
||||
config_unset --no-restart "$APP" DOKKU_CHECKS_DISABLED
|
||||
DOKKU_QUIET_OUTPUT=1 config_unset --no-restart "$APP" DOKKU_CHECKS_DISABLED
|
||||
else
|
||||
config_set --no-restart "$APP" DOKKU_CHECKS_DISABLED="$DOKKU_CHECKS_DISABLED"
|
||||
DOKKU_QUIET_OUTPUT=1 config_set --no-restart "$APP" DOKKU_CHECKS_DISABLED="$DOKKU_CHECKS_DISABLED"
|
||||
fi
|
||||
|
||||
if [[ -z "$DOKKU_CHECKS_SKIPPED" ]]; then
|
||||
config_unset --no-restart "$APP" DOKKU_CHECKS_SKIPPED
|
||||
DOKKU_QUIET_OUTPUT=1 config_unset --no-restart "$APP" DOKKU_CHECKS_SKIPPED
|
||||
else
|
||||
config_set --no-restart "$APP" DOKKU_CHECKS_SKIPPED="$DOKKU_CHECKS_SKIPPED"
|
||||
DOKKU_QUIET_OUTPUT=1 config_set --no-restart "$APP" DOKKU_CHECKS_SKIPPED="$DOKKU_CHECKS_SKIPPED"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -96,6 +96,18 @@ dokku_log_verbose() {
|
||||
echo " $*"
|
||||
}
|
||||
|
||||
dokku_log_exclaim_quiet() {
|
||||
declare desc="log exclaim formatter"
|
||||
if [[ -z "$DOKKU_QUIET_OUTPUT" ]]; then
|
||||
echo " ! $*"
|
||||
fi
|
||||
}
|
||||
|
||||
dokku_log_exclaim() {
|
||||
declare desc="log exclaim formatter"
|
||||
echo " ! $*"
|
||||
}
|
||||
|
||||
dokku_log_warn_quiet() {
|
||||
declare desc="log warning formatter"
|
||||
if [[ -z "$DOKKU_QUIET_OUTPUT" ]]; then
|
||||
@@ -666,7 +678,7 @@ dokku_receive() {
|
||||
local DOKKU_SKIP_CLEANUP="$(config_get "$APP" DOKKU_SKIP_CLEANUP || true)"
|
||||
docker_cleanup "$APP"
|
||||
dokku_log_info1 "Building $APP from $IMAGE_SOURCE_TYPE..."
|
||||
config_set --no-restart "$APP" DOKKU_APP_TYPE="$IMAGE_SOURCE_TYPE" &>/dev/null
|
||||
DOKKU_QUIET_OUTPUT=1 config_set --no-restart "$APP" DOKKU_APP_TYPE="$IMAGE_SOURCE_TYPE"
|
||||
dokku_build "$APP" "$IMAGE_SOURCE_TYPE" "$TMP_WORK_DIR"
|
||||
release_and_deploy "$APP"
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package config
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"regexp"
|
||||
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
@@ -46,8 +47,10 @@ func SetMany(appName string, entries map[string]string, restart bool) (err error
|
||||
keys = append(keys, k)
|
||||
}
|
||||
if len(entries) != 0 {
|
||||
common.LogInfo1("Setting config vars")
|
||||
fmt.Println(prettyPrintEnvEntries(" ", entries))
|
||||
common.LogInfo1Quiet("Setting config vars")
|
||||
if os.Getenv("DOKKU_QUIET_OUTPUT") == "" {
|
||||
fmt.Println(prettyPrintEnvEntries(" ", entries))
|
||||
}
|
||||
env.Write()
|
||||
triggerUpdate(appName, "set", keys)
|
||||
}
|
||||
@@ -72,11 +75,11 @@ func UnsetMany(appName string, keys []string, restart bool) (err error) {
|
||||
}
|
||||
for _, k := range keys {
|
||||
if _, hasKey := env.Map()[k]; hasKey {
|
||||
common.LogInfo1(fmt.Sprintf("Unsetting %s", k))
|
||||
common.LogInfo1Quiet(fmt.Sprintf("Unsetting %s", k))
|
||||
env.Unset(k)
|
||||
changed = true
|
||||
} else {
|
||||
common.LogInfo1(fmt.Sprintf("Skipping %s, it is not set in the environment", k))
|
||||
common.LogInfo1Quiet(fmt.Sprintf("Skipping %s, it is not set in the environment", k))
|
||||
}
|
||||
}
|
||||
if changed {
|
||||
|
||||
@@ -24,7 +24,7 @@ disable_app_vhost() {
|
||||
|
||||
[[ "$2" == "--no-restart" ]] && local CONFIG_SET_ARGS=$2
|
||||
# shellcheck disable=SC2086
|
||||
config_set $CONFIG_SET_ARGS $APP NO_VHOST=1
|
||||
DOKKU_QUIET_OUTPUT=1 config_set $CONFIG_SET_ARGS $APP NO_VHOST=1
|
||||
}
|
||||
|
||||
domains_setup() {
|
||||
@@ -212,7 +212,7 @@ enable_app_vhost() {
|
||||
plugn trigger pre-enable-vhost "$APP"
|
||||
[[ "$2" == "--no-restart" ]] && local CONFIG_SET_ARGS=$2
|
||||
# shellcheck disable=SC2086
|
||||
config_set $CONFIG_SET_ARGS "$APP" NO_VHOST=0
|
||||
DOKKU_QUIET_OUTPUT=1 config_set $CONFIG_SET_ARGS "$APP" NO_VHOST=0
|
||||
}
|
||||
|
||||
get_app_domains() {
|
||||
|
||||
@@ -165,7 +165,7 @@ git_build() {
|
||||
fi
|
||||
|
||||
if [[ -n "$ENV_VAR_NAME" ]]; then
|
||||
config_set --no-restart "$APP" "${ENV_VAR_NAME}=${REV}" >/dev/null
|
||||
DOKKU_QUIET_OUTPUT=1 config_set --no-restart "$APP" "${ENV_VAR_NAME}=${REV}"
|
||||
fi
|
||||
local REF="$REV"
|
||||
else
|
||||
|
||||
@@ -18,14 +18,14 @@ migrate_git_vars_0_12_0() {
|
||||
DOKKU_DEPLOY_BRANCH=$(config_get --global DOKKU_DEPLOY_BRANCH || true)
|
||||
if [[ -n "$DOKKU_DEPLOY_BRANCH" ]]; then
|
||||
fn-plugin-property-write "git" --global "deploy-branch" "$DOKKU_DEPLOY_BRANCH"
|
||||
config_unset --global DOKKU_DEPLOY_BRANCH || true
|
||||
DOKKU_QUIET_OUTPUT=1 config_unset --global DOKKU_DEPLOY_BRANCH || true
|
||||
fi
|
||||
|
||||
for app in $APPS; do
|
||||
DOKKU_DEPLOY_BRANCH=$(config_get "$app" DOKKU_DEPLOY_BRANCH || true)
|
||||
if [[ -n "$DOKKU_DEPLOY_BRANCH" ]]; then
|
||||
fn-plugin-property-write "git" "$app" "deploy-branch" "$DOKKU_DEPLOY_BRANCH"
|
||||
config_unset --no-restart "$app" DOKKU_DEPLOY_BRANCH || true
|
||||
DOKKU_QUIET_OUTPUT=1 config_unset --no-restart "$app" DOKKU_DEPLOY_BRANCH || true
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ configure_nginx_ports() {
|
||||
else
|
||||
local PROXY_PORT=80
|
||||
fi
|
||||
config_set --no-restart "$APP" DOKKU_PROXY_PORT="$PROXY_PORT"
|
||||
DOKKU_QUIET_OUTPUT=1 config_set --no-restart "$APP" DOKKU_PROXY_PORT="$PROXY_PORT"
|
||||
fi
|
||||
if [[ -z "$DOKKU_PROXY_SSL_PORT" ]]; then
|
||||
if (is_ssl_enabled "$APP"); then
|
||||
@@ -132,7 +132,7 @@ configure_nginx_ports() {
|
||||
dokku_log_info1 "no proxy ssl port set. setting to random open high port"
|
||||
PROXY_SSL_PORT=$(get_available_port)
|
||||
fi
|
||||
config_set --no-restart "$APP" DOKKU_PROXY_SSL_PORT="$PROXY_SSL_PORT"
|
||||
DOKKU_QUIET_OUTPUT=1 config_set --no-restart "$APP" DOKKU_PROXY_SSL_PORT="$PROXY_SSL_PORT"
|
||||
fi
|
||||
fi
|
||||
if [[ -z "$DOKKU_PROXY_PORT_MAP" ]]; then
|
||||
@@ -154,7 +154,7 @@ configure_nginx_ports() {
|
||||
if [[ -n "$PROXY_PORT_MAP" ]]; then
|
||||
local PROXY_PORT_MAP="$(echo "$PROXY_PORT_MAP" | xargs)"
|
||||
local PROXY_PORT_MAP+=" $(merge_dedupe_list "$(remove_val_from_list "$PORT_MAP" "$DOKKU_PROXY_PORT_MAP" " ")" " ") "
|
||||
config_set --no-restart "$APP" DOKKU_PROXY_PORT_MAP="$PROXY_PORT_MAP"
|
||||
DOKKU_QUIET_OUTPUT=1 config_set --no-restart "$APP" DOKKU_PROXY_PORT_MAP="$PROXY_PORT_MAP"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -83,13 +83,13 @@ for app in $(dokku_apps); do
|
||||
fi
|
||||
if [[ -n "$nginx_port" ]]; then
|
||||
dokku_log_info1 "Migrating DOKKU_NGINX_PORT to DOKKU_PROXY_PORT for $app"
|
||||
config_set --no-restart "$app" DOKKU_PROXY_PORT="$nginx_port"
|
||||
config_unset --no-restart "$app" DOKKU_NGINX_PORT
|
||||
DOKKU_QUIET_OUTPUT=1 config_set --no-restart "$app" DOKKU_PROXY_PORT="$nginx_port"
|
||||
DOKKU_QUIET_OUTPUT=1 config_unset --no-restart "$app" DOKKU_NGINX_PORT
|
||||
fi
|
||||
if [[ -n "$nginx_ssl_port" ]]; then
|
||||
dokku_log_info1 "Migrating DOKKU_NGINX_SSL_PORT to DOKKU_PROXY_SSL_PORT for $app"
|
||||
config_set --no-restart "$app" DOKKU_PROXY_SSL_PORT="$nginx_ssl_port"
|
||||
config_unset --no-restart "$app" DOKKU_NGINX_SSL_PORT
|
||||
DOKKU_QUIET_OUTPUT=1 config_set --no-restart "$app" DOKKU_PROXY_SSL_PORT="$nginx_ssl_port"
|
||||
DOKKU_QUIET_OUTPUT=1 config_unset --no-restart "$app" DOKKU_NGINX_SSL_PORT
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
@@ -15,10 +15,10 @@ nginx_post_certs_update() {
|
||||
local DOKKU_PROXY_PORT_MAP=$(config_get "$APP" DOKKU_PROXY_PORT_MAP)
|
||||
|
||||
if [[ "$DOKKU_PROXY_PORT" == "80" ]]; then
|
||||
config_unset --no-restart "$APP" DOKKU_PROXY_PORT
|
||||
DOKKU_QUIET_OUTPUT=1 config_unset --no-restart "$APP" DOKKU_PROXY_PORT
|
||||
fi
|
||||
if [[ "$DOKKU_PROXY_SSL_PORT" == "443" ]]; then
|
||||
config_unset --no-restart "$APP" DOKKU_PROXY_SSL_PORT
|
||||
DOKKU_QUIET_OUTPUT=1 config_unset --no-restart "$APP" DOKKU_PROXY_SSL_PORT
|
||||
fi
|
||||
if [[ "$DOKKU_PROXY_PORT_MAP" == *http:80:* ]]; then
|
||||
# shellcheck disable=SC2046
|
||||
|
||||
@@ -10,7 +10,7 @@ nginx_pre_disable_vhost_trigger() {
|
||||
local trigger="nginx_pre_disable_vhost_trigger"
|
||||
local APP="$1"
|
||||
if [[ "$(get_app_proxy_type "$APP")" == "nginx" ]]; then
|
||||
config_unset --no-restart "$APP" DOKKU_PROXY_PORT DOKKU_PROXY_SSL_PORT DOKKU_PROXY_PORT_MAP
|
||||
DOKKU_QUIET_OUTPUT=1 config_unset --no-restart "$APP" DOKKU_PROXY_PORT DOKKU_PROXY_SSL_PORT DOKKU_PROXY_PORT_MAP
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ nginx_pre_enable_vhost_trigger() {
|
||||
local trigger="nginx_pre_enable_vhost_trigger"
|
||||
local APP="$1"
|
||||
if [[ "$(get_app_proxy_type "$APP")" == "nginx" ]]; then
|
||||
config_unset --no-restart "$APP" DOKKU_PROXY_PORT DOKKU_PROXY_SSL_PORT DOKKU_PROXY_PORT_MAP
|
||||
DOKKU_QUIET_OUTPUT=1 config_unset --no-restart "$APP" DOKKU_PROXY_PORT DOKKU_PROXY_SSL_PORT DOKKU_PROXY_PORT_MAP
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ add_proxy_ports() {
|
||||
local INPUT_PORTS="$*"
|
||||
if [[ -n "$INPUT_PORTS" ]]; then
|
||||
PROXY_PORT_MAP="$(merge_dedupe_list "$PROXY_PORT_MAP $INPUT_PORTS" " ")"
|
||||
config_set --no-restart "$APP" DOKKU_PROXY_PORT_MAP="$PROXY_PORT_MAP"
|
||||
DOKKU_QUIET_OUTPUT=1 config_set --no-restart "$APP" DOKKU_PROXY_PORT_MAP="$PROXY_PORT_MAP"
|
||||
else
|
||||
dokku proxy:help
|
||||
dokku_log_fail "No port mapping specified. Exiting..."
|
||||
@@ -107,9 +107,9 @@ remove_proxy_ports() {
|
||||
PROXY_PORT_MAP="$(echo "$PROXY_PORT_MAP" | xargs)"
|
||||
PROXY_PORT_MAP="$(merge_dedupe_list "$PROXY_PORT_MAP" " ")"
|
||||
if [[ -n "$PROXY_PORT_MAP" ]]; then
|
||||
config_set --no-restart "$APP" DOKKU_PROXY_PORT_MAP="$PROXY_PORT_MAP"
|
||||
DOKKU_QUIET_OUTPUT=1 config_set --no-restart "$APP" DOKKU_PROXY_PORT_MAP="$PROXY_PORT_MAP"
|
||||
else
|
||||
config_unset --no-restart "$APP" DOKKU_PROXY_PORT_MAP
|
||||
DOKKU_QUIET_OUTPUT=1 config_unset --no-restart "$APP" DOKKU_PROXY_PORT_MAP
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ set_proxy_ports() {
|
||||
local INPUT_PORTS="$*"
|
||||
if [[ -n "$INPUT_PORTS" ]]; then
|
||||
PROXY_PORT_MAP="$(merge_dedupe_list "$INPUT_PORTS" " ")"
|
||||
config_set --no-restart "$APP" DOKKU_PROXY_PORT_MAP="$PROXY_PORT_MAP"
|
||||
DOKKU_QUIET_OUTPUT=1 config_set --no-restart "$APP" DOKKU_PROXY_PORT_MAP="$PROXY_PORT_MAP"
|
||||
else
|
||||
dokku proxy:help
|
||||
dokku_log_fail "No port mapping specified. Exiting..."
|
||||
|
||||
@@ -10,7 +10,7 @@ trigger-proxy-post-certs-remove() {
|
||||
local trigger="nginx_post_certs_remove"
|
||||
local APP="$1"
|
||||
|
||||
config_unset --no-restart "$APP" DOKKU_PROXY_SSL_PORT
|
||||
DOKKU_QUIET_OUTPUT=1 config_unset --no-restart "$APP" DOKKU_PROXY_SSL_PORT
|
||||
|
||||
# shellcheck disable=SC2046
|
||||
remove_proxy_ports "$APP" $(filter_app_proxy_ports "$APP" "https" "443")
|
||||
|
||||
@@ -16,7 +16,7 @@ proxy_disable_cmd() {
|
||||
dokku_log_info1 "Disabling proxy for app ($APP)"
|
||||
[[ "$2" == "--no-restart" ]] && local CONFIG_SET_ARGS=$2
|
||||
# shellcheck disable=SC2086
|
||||
config_set $CONFIG_SET_ARGS $APP DOKKU_DISABLE_PROXY=1
|
||||
DOKKU_QUIET_OUTPUT=1 config_set $CONFIG_SET_ARGS $APP DOKKU_DISABLE_PROXY=1
|
||||
plugn trigger proxy-disable "$APP"
|
||||
else
|
||||
dokku_log_info1 "proxy is already disable for app ($APP)"
|
||||
|
||||
@@ -16,7 +16,7 @@ proxy_enable_cmd() {
|
||||
dokku_log_info1 "Enabling proxy for app ($APP)"
|
||||
[[ "$2" == "--no-restart" ]] && local CONFIG_SET_ARGS=$2
|
||||
# shellcheck disable=SC2086
|
||||
config_unset $CONFIG_SET_ARGS $APP DOKKU_DISABLE_PROXY
|
||||
DOKKU_QUIET_OUTPUT=1 config_unset $CONFIG_SET_ARGS $APP DOKKU_DISABLE_PROXY
|
||||
plugn trigger proxy-enable "$APP"
|
||||
else
|
||||
dokku_log_info1 "proxy is already enabled for app ($APP)"
|
||||
|
||||
@@ -10,7 +10,7 @@ proxy_ports_clear_cmd() {
|
||||
local APP="$2"
|
||||
verify_app_name "$APP"
|
||||
|
||||
config_unset --no-restart "$APP" DOKKU_PROXY_PORT_MAP
|
||||
DOKKU_QUIET_OUTPUT=1 config_unset --no-restart "$APP" DOKKU_PROXY_PORT_MAP
|
||||
plugn trigger post-proxy-ports-update "$APP" "clear"
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ proxy_set_cmd() {
|
||||
local PROXY_TYPE="$3"
|
||||
|
||||
if [[ -n "$PROXY_TYPE" ]]; then
|
||||
config_set --no-restart "$APP" DOKKU_APP_PROXY_TYPE="$PROXY_TYPE"
|
||||
DOKKU_QUIET_OUTPUT=1 config_set --no-restart "$APP" DOKKU_APP_PROXY_TYPE="$PROXY_TYPE"
|
||||
else
|
||||
dokku_log_fail "Please specify a proxy type!"
|
||||
fi
|
||||
|
||||
@@ -11,7 +11,7 @@ ps_core_post_deploy() {
|
||||
local APP="$1"
|
||||
|
||||
remove_procfile "$APP"
|
||||
config_set --no-restart "$APP" DOKKU_APP_RESTORE=1
|
||||
DOKKU_QUIET_OUTPUT=1 config_set --no-restart "$APP" DOKKU_APP_RESTORE=1
|
||||
}
|
||||
|
||||
ps_core_post_deploy "$@"
|
||||
|
||||
@@ -19,9 +19,7 @@ print_dokku_scale_file() {
|
||||
declare desc="prints contents of DOKKU_SCALE file"
|
||||
local APP="$1"
|
||||
local DOKKU_SCALE_FILE="$DOKKU_ROOT/$APP/DOKKU_SCALE"
|
||||
while read -r line || [[ -n "$line" ]]; do
|
||||
dokku_log_info2_quiet "$line"
|
||||
done <"$DOKKU_SCALE_FILE"
|
||||
dokku_log_verbose_quiet "DOKKU_SCALE declares scale -> $(xargs <"$DOKKU_SCALE_FILE")"
|
||||
}
|
||||
|
||||
extract_procfile() {
|
||||
@@ -84,9 +82,6 @@ generate_scale_file() {
|
||||
else
|
||||
echo "web=1" >>"$DOKKU_SCALE_FILE"
|
||||
fi
|
||||
dokku_log_info1_quiet "New DOKKU_SCALE file generated"
|
||||
else
|
||||
dokku_log_info1_quiet "DOKKU_SCALE file found ($DOKKU_SCALE_FILE)"
|
||||
fi
|
||||
print_dokku_scale_file "$APP"
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ ps_post_stop() {
|
||||
local trigger="ps_post_stop"
|
||||
local APP="$1"
|
||||
|
||||
config_set --no-restart "$APP" DOKKU_APP_RESTORE=0
|
||||
DOKKU_QUIET_OUTPUT=1 config_set --no-restart "$APP" DOKKU_APP_RESTORE=0
|
||||
}
|
||||
|
||||
ps_post_stop "$@"
|
||||
|
||||
Reference in New Issue
Block a user