Networking - Docker

Nginx knows about the web app container because it's configured to do so within the Docker Compose environment.

Here's a breakdown of how it works:

→ Docker compose resolves the webapp container name to its IP address within the network, allowing Nginx to forward requests to the correct container.

Ref: Networking - Docker