bind docker container to internal port if using vhosts

This commit is contained in:
Michael Hobbs committed 2015-01-02 16:27:19 -08:00
1 parent 8535900f9d
commit 948d7902f2
6 files changed
+99 -8

No files matched your search

+2 -2
View File
@@ -15,7 +15,7 @@ restart_nginx () {
case "$1" in
nginx:build-config)
APP="$2"; PORT="$3"
APP="$2"; PORT="$3"; IP="${4:-127.0.0.1}"
[[ -z "$PORT" ]] && PORT=$(< "$DOKKU_ROOT/$APP/PORT")
VHOST_PATH="$DOKKU_ROOT/$APP/VHOST"
WILDCARD_SSL="$DOKKU_ROOT/tls"
@@ -68,7 +68,7 @@ EOF
NOSSL_SERVER_NAME=$(echo $NONSSL_VHOSTS $SSL_VHOSTS| tr '\n' ' ')
echo "-----> Creating $SCHEME nginx.conf"
echo "upstream $APP { server 127.0.0.1:$PORT; }" > $DOKKU_ROOT/$APP/nginx.conf
echo "upstream $APP { server $IP:$PORT; }" > $DOKKU_ROOT/$APP/nginx.conf
eval "cat <<< \"$(< $NGINX_CONF)\" >> $DOKKU_ROOT/$APP/nginx.conf"
echo "-----> Running nginx-pre-reload"