Hello, I think you would prefer to connect via internal dns names rather than static IPs. I have a slightly similar setup with docker compose creating a network for my apps.
Here I run my app and set the hostname. Note this app is on two docker networks, but for access from nginx it is on the “reverse_proxy” network: github.com/HugoKlepsch/…/docker-compose.yaml#L21
Here is a configuration file where I tell nginx where to find one of my apps on the reverse proxy docker network. Note the name references the name of the app and the docker network: github.com/HugoKlepsch/reverse-proxy/…/buzz.conf#…