Nginx reverse proxy not connecting to rails web container through docker-compose and Puma/SSL

Can you share what your intention is with this?

How is the nginx container supposed to know how to access a port in the web_prod container?
You need to use the service name of the target container as upstream server.

But I wouldn’t recommend configuring it that way either, as it will not work reliably because of dns resolution caching. Here is a post about how to bypass that. NGINX swarm redeploy timeouts - #5 by meyay.

1 Like