feat: make coredns-docker upstream resolution opt-in

The bundled `nginx.conf.sigil` keeps rendering IP-based upstreams unless `dns-resolver` is set, for example with `dokku nginx:set --global dns-resolver 127.0.0.1:1053`. Unsetting the property reverts to IP-based upstreams, replacing the previous `off` sentinel.
This commit is contained in:
Jose Diaz-Gonzalez committed 2026-11-06 20:51:33 -05:00
1 parent b5315de49b
commit bf2795640c
10 files changed
+107 -73

No files matched your search

@@ -84,7 +84,7 @@ server {
gzip_vary on;
gzip_comp_level 6;
{{ if ne $.NGINX_DNS_RESOLVER "off" }}
{{ if $.NGINX_DNS_RESOLVER }}
resolver {{ $.NGINX_DNS_RESOLVER }} valid=10s ipv6=off;
resolver_timeout {{ $.NGINX_DNS_RESOLVER_TIMEOUT }};
set $dokku_upstream "{{ $.DOKKU_APP_WEB_LISTENER_HOST }}:{{ $upstream_port }}";
@@ -173,7 +173,7 @@ server {
{{ end }}
location / {
{{ if ne $.NGINX_DNS_RESOLVER "off" }}
{{ if $.NGINX_DNS_RESOLVER }}
resolver {{ $.NGINX_DNS_RESOLVER }} valid=10s ipv6=off;
resolver_timeout {{ $.NGINX_DNS_RESOLVER_TIMEOUT }};
set $dokku_upstream "{{ $.DOKKU_APP_WEB_LISTENER_HOST }}:{{ $upstream_port }}";
@@ -190,7 +190,7 @@ server {
{{ end }}
{{ end }}
{{ if eq $.NGINX_DNS_RESOLVER "off" }}
{{ if not $.NGINX_DNS_RESOLVER }}
{{ if $.DOKKU_APP_WEB_LISTENERS }}
{{ range $upstream_port := $.PROXY_UPSTREAM_PORTS | split " " }}
upstream {{ $.APP }}-{{ $upstream_port }} {