initial pass at nginx proxy without VHOST. closes #1123

This commit is contained in:
Michael Hobbs
2015-09-17 19:09:29 -07:00
parent a1d8cc23b9
commit 4dd4d7c567
12 changed files with 287 additions and 177 deletions

View File

@@ -3,6 +3,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/functions"
RE_IPV4="([0-9]{1,3}[\.]){3}[0-9]{1,3}"
@@ -94,7 +95,7 @@ case "$1" in
echo "$DOMAIN" >> "$DOKKU_ROOT/$APP/VHOST"
done
# we need to restart the app to make sure we're binding to the appropriate network interface
dokku nginx:build-config $APP
nginx_build_config $APP
plugn trigger post-domains-update $APP
for DOMAIN in "$@"; do
dokku_log_info1 "Added $DOMAIN to $APP"

View File

@@ -3,6 +3,9 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
get_app_domains() {
local APP=$1; verify_app_name $APP
cat "$DOKKU_ROOT/$APP/VHOST"
local APP=$1; local VHOST_FILE="$DOKKU_ROOT/$APP/VHOST"
verify_app_name $APP
if [[ -f "$VHOST_FILE" ]]; then
cat "$VHOST_FILE"
fi
}