only run domains and nginx config if we have a port and ip. fixes #1355

This commit is contained in:
Michael Hobbs
2015-07-30 14:29:36 -07:00
parent b0d55ce589
commit 11e10fceef
7 changed files with 33 additions and 7 deletions

View File

@@ -3,12 +3,14 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$(dirname $0)/../common/functions"
APP="$1"
NO_VHOST=$(dokku config:get $APP NO_VHOST || true)
if [[ -f "$DOKKU_ROOT/$APP/IP.web.1" ]] && [[ -f "$DOKKU_ROOT/$APP/PORT.web.1" ]]; then
NO_VHOST=$(dokku config:get $APP NO_VHOST || true)
if [[ -n "$NO_VHOST" ]]; then
dokku_log_info1 "NO_VHOST config detected"
elif [[ ! -f "$DOKKU_ROOT/$APP/VHOST" ]]; then
dokku domains:setup $APP
if [[ -n "$NO_VHOST" ]]; then
dokku_log_info1 "NO_VHOST config detected"
elif [[ ! -f "$DOKKU_ROOT/$APP/VHOST" ]]; then
dokku domains:setup $APP
fi
dokku nginx:build-config $APP
fi
dokku nginx:build-config $APP