File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 1+ # Intentionally blank
Original file line number Diff line number Diff line change @@ -51,6 +51,10 @@ http {
5151
5252 access_log /data/logs/default.log proxy;
5353
54+ # Dynamically generated resolvers file
55+ include /etc/nginx/conf.d/include /resolvers.conf;
56+
57+ # Files generated by NPM
5458 include /etc/nginx/conf.d/*.conf;
5559 include /data/nginx/proxy_host/*.conf;
5660 include /data/nginx/redirection_host/*.conf;
5963}
6064
6165stream {
66+ # Files generated by NPM
6267 include /data/nginx/stream /*.conf;
6368}
6469
Original file line number Diff line number Diff line change 11#!/usr/bin/with-contenv bash
22
3+ # Create required folders
34mkdir -p /tmp/nginx/body \
45 /var/log/nginx \
56 /data/nginx \
@@ -17,4 +18,8 @@ mkdir -p /tmp/nginx/body \
1718touch /var/log/nginx/error.log && chmod 777 /var/log/nginx/error.log
1819chown root /tmp/nginx
1920
21+ # Dynamically generate resolvers file
22+ echo resolver $(awk 'BEGIN{ORS=" "} $1=="nameserver" {print $2}' /etc/resolv.conf) ";" > /etc/nginx/conf.d/include/resolvers.conf
23+
24+ # Run
2025exec nginx
You can’t perform that action at this time.
0 commit comments