refactor: remove use of IP and PORT files from core-post-deploy plugin

This commit is contained in:
Jose Diaz-Gonzalez
2017-09-03 03:07:24 -04:00
committed by Michael Hobbs
parent 7fe2f8593c
commit dc00542b6f
5 changed files with 54 additions and 2 deletions

View File

@@ -9,7 +9,10 @@ nginx_core_post_deploy() {
declare desc="nginx-vhosts core-post-deploy plugin trigger"
local trigger="nginx_core_post_deploy"
local APP="$1"
if [[ -f "$DOKKU_ROOT/$APP/IP.web.1" ]] && [[ -f "$DOKKU_ROOT/$APP/PORT.web.1" ]]; then
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