mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 08:29:56 +01:00
While I do not agree with _every_ style change, this will force Dokku to have consistent formatting across all shell scripts, which is arguably a Good Thing™. The command used to reprocess everything is: ```shell shfmt -l -bn -ci -i 2 -w . ```
30 lines
913 B
Bash
Executable File
30 lines
913 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -eo pipefail
|
|
[[ $DOKKU_TRACE ]] && set -x
|
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
|
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
|
|
source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/functions"
|
|
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
|
|
|
|
nginx_core_post_deploy() {
|
|
declare desc="nginx-vhosts core-post-deploy plugin trigger"
|
|
local trigger="nginx_core_post_deploy"
|
|
local APP="$1"
|
|
local HAS_NETWORK_CONFIG
|
|
|
|
HAS_NETWORK_CONFIG="$(plugn trigger network-config-exists "$APP")"
|
|
if [[ "$HAS_NETWORK_CONFIG" == "true" ]]; then
|
|
if [[ "$(is_app_vhost_enabled "$APP")" == "false" ]]; then
|
|
dokku_log_info1 "VHOST support disabled. Skipping domains setup"
|
|
elif [[ ! -f "$DOKKU_ROOT/$APP/VHOST" ]]; then
|
|
domains_setup "$APP"
|
|
fi
|
|
|
|
nginx_build_config "$APP"
|
|
fi
|
|
}
|
|
|
|
if [[ "$(get_app_proxy_type "$1")" == "nginx" ]]; then
|
|
nginx_core_post_deploy "$@"
|
|
fi
|