File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -47,10 +47,22 @@ for MAPPING in "${MAPPING_LIST[@]}"; do
4747 echo " Port: $PROXY_PORT "
4848 fi
4949
50+ # Determine which template to use
51+ CUSTOM_TEMPLATE=" /app/${PROXY_HOST} .${PROXY_PORT} .conf"
52+ DEFAULT_TEMPLATE=" /app/default.conf.template"
53+
54+ if [ -f " $CUSTOM_TEMPLATE " ]; then
55+ TEMPLATE=" $CUSTOM_TEMPLATE "
56+ echo " Using custom template: $TEMPLATE "
57+ else
58+ TEMPLATE=" $DEFAULT_TEMPLATE "
59+ echo " Using default template: $TEMPLATE "
60+ fi
61+
5062 # Use envsubst to produce a .conf per domain
5163 envsubst ' $PROXY_DOMAIN,$PROXY_HOST,$PROXY_PORT' \
52- < /app/default.conf.template \
53- > " /etc/nginx/conf.d/${PROXY_DOMAIN} .conf"
64+ < " $TEMPLATE " \
65+ > " /etc/nginx/conf.d/${PROXY_DOMAIN} .conf"
5466
5567 # -------------------------
5668 # Issue or Install SSL Cert
You can’t perform that action at this time.
0 commit comments