Docker's internal DNS server often returns SERVFAIL for IPv6 (AAAA)
queries if IPv6 is disabled on the network. When Nginx encounters a
SERVFAIL for IPv6, it considers the whole resolution failed and throws
a 502 Bad Gateway. Added ipv6=off to the resolver directive.
Nginx was crashing on startup because it tried to resolve the 'master'
hostname before the Spring Boot container was ready. Fixed by using
Docker's embedded DNS resolver (127.0.0.11) and a variable for
proxy_pass, which defers resolution to request time.