Merge pull request #2150 from dokku/2149_mh-config-vars-in-nginx-template

export app config vars into sigil environment for use in nginx templates
This commit is contained in:
Michael Hobbs committed 2016-04-27 12:50:49 -07:00
commit 17a602efe8
2 files changed
+3

No files matched your search

+2
View File
@@ -69,6 +69,8 @@ server {
{{ .SSL_SERVER_NAME }} List of SSL VHOSTS {{ .SSL_SERVER_NAME }} List of SSL VHOSTS
``` ```
> NOTE: Application config variables are available for use in custom templates. To do so, use the form of `{{ var "FOO" }}` to access a variable named `FOO`.
### Example HTTP to HTTPS Custom Template ### Example HTTP to HTTPS Custom Template
Use case: a simple dockerfile app that includes `EXPOSE 80` Use case: a simple dockerfile app that includes `EXPOSE 80`
+1
View File
@@ -188,6 +188,7 @@ nginx_build_config() {
fi fi
local SSL_SERVER_NAME=$(echo "$SSL_VHOSTS" | xargs) local SSL_SERVER_NAME=$(echo "$SSL_VHOSTS" | xargs)
fi fi
eval "$(config_export app "$APP")"
local SIGIL_PARAMS=(-f $NGINX_TEMPLATE APP="$APP" DOKKU_ROOT="$DOKKU_ROOT" local SIGIL_PARAMS=(-f $NGINX_TEMPLATE APP="$APP" DOKKU_ROOT="$DOKKU_ROOT"
NOSSL_SERVER_NAME="$NOSSL_SERVER_NAME" NOSSL_SERVER_NAME="$NOSSL_SERVER_NAME"
DOKKU_APP_LISTENERS="$DOKKU_APP_LISTENERS" DOKKU_APP_LISTENERS="$DOKKU_APP_LISTENERS"