Cannot curl by domain name, just by IP!

so you have some host, running 3 containers…

where are u issuing the curl command? host?

where do you THINK example.com is? off your host? or in one of the containers?

if in one of the containers, how did the containers ip (only accessible from inside the docker host) get mapped to that dns entry? docker does not do that… docker compose does not do that… compose creates dynamic entries for THAT COMPOSE FILE only…the hose does not know