nginx-proxy
nginx-proxy copied to clipboard
resolve services by alias, not ip
I'm wondering why nginx-proxy is resolving proxy_pass as IP but not service alias name? It looks like I have issues with nginx-proxy on multi node swarm setup
Yeh, that's a known issue. Nginx-proxy uses ip instead of dns, and it can see containers running on the same host only.
Advantage of this is, nginx doesn't have to resolve DNS and the requests don't hop to another other server.
In my swarm setup I am using a workaround. I run running nginx-proxy with mode=global
and restrict the placement of the containers to be exposed and then I update my dns for that service to the node on which It will run.
@mesudip but it requires a simple fix to work with aliases
Indeed, may be I should make it possible to configure what to use with an Environment Variable
@mesudip it would be wonderful if you may add the fix