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
47
47
echo " Port: $PROXY_PORT "
48
48
fi
49
49
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
+
50
62
# Use envsubst to produce a .conf per domain
51
63
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"
54
66
55
67
# -------------------------
56
68
# Issue or Install SSL Cert
You can’t perform that action at this time.
0 commit comments