File tree Expand file tree Collapse file tree
defaults/nginx/site-confs Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55
66# --- Configuration ---
77TEMPLATE_DIR = '/app/config-generator/templates'
8- PROXY_OUTPUT_DIR = '/config/nginx/proxy-confs'
8+ PROXY_OUTPUT_DIR = '/config/nginx/env- proxy-confs'
99DEFAULT_CONF_OUTPUT = '/config/nginx/site-confs/default.conf'
1010HTPASSWD_FILE = '/config/nginx/.htpasswd'
1111# ---------------------
Original file line number Diff line number Diff line change @@ -100,4 +100,6 @@ server {
100100}
101101
102102# enable subdomain method reverse proxy confs
103- include /config/nginx/proxy-confs/*.conf;
103+ include /config/nginx/proxy-confs/*.subdomain.conf;
104+ # enable env var subdomain method reverse proxy confs
105+ include /config/nginx/env-proxy-confs/*.subdomain.conf;
Original file line number Diff line number Diff line change @@ -82,3 +82,5 @@ server {
8282
8383# enable subdomain method reverse proxy confs
8484include /config/nginx/proxy-confs/*.subdomain.conf;
85+ # enable env var subdomain method reverse proxy confs
86+ include /config/nginx/env-proxy-confs/*.subdomain.conf;
Original file line number Diff line number Diff line change @@ -43,12 +43,11 @@ if [[ ! -f /config/nginx/ldap-server.conf ]]; then
4343 cp /defaults/nginx/ldap-server.conf.sample /config/nginx/ldap-server.conf
4444fi
4545
46+ # clean the env target directory to ensure a fresh start
47+ rm -f /config/nginx/env-proxy-confs/*
4648# check if any PROXY_CONFIG environment variables are set
4749if env | grep -q "^PROXY_CONFIG_"; then
4850 echo "INFO: Found PROXY_CONFIG environment variables. Generating Nginx configs from environment..."
49- # clean the target directory to ensure a fresh start
50- echo "INFO: Cleaning /config/nginx/proxy-confs/ of existing files..."
51- rm -f /config/nginx/proxy-confs/*
5251 # run the Python generator script
5352 echo "INFO: Running python config generator..."
5453 if ! python3 /app/config-generator/generate_configs.py; then
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ mkdir -p \
66 /config/{fail2ban,dns-conf} \
77 /config/etc/letsencrypt/renewal-hooks \
88 /config/log/{fail2ban,letsencrypt,nginx} \
9+ /config/nginx/env-proxy-confs \
910 /config/nginx/proxy-confs \
1011 /run/fail2ban \
1112 /tmp/letsencrypt
You can’t perform that action at this time.
0 commit comments