I have a simple node script that runs in a container and a nginx container running 2 different web-sites (let's call them default.example.com and foobar.example.com). default.example.com is configured a the default host in the nginx file.
So when I make a call to http://nginx from my node container, I will reach the default.example.com page. But how can I curl the foobar.example.com from the node container?
I think I have to pass the domains in my docker compose file so the containers know where the following request will go, but I haven't found a solution yet.