I have two dockerized apps, each consisting of an nginx + php-fpm container sitting behind another nginx proxy container. Both apps I can access via a locally defined hostname, say domain-1.dev and domain-2.dev. Here's my hosts file:
10.0.75.1 domain-1.dev domain-2.dev
None of the containers are linked beyond defining the VIRTUAL_HOST=...
env variable in each of the nginx containers as required by the jwilder/nginx-proxy
image I'm using for the proxy:
https://github.com/jwilder/nginx-proxy
Therefore from a browser on the host I can access each of the domains and get served php files in their relevant php-fpm containers.
Question: what do I need to setup to be able to curl one domain from another, e.g. to curl domain-1.dev
from within the php-fpm container of the domain-2.dev app?
At the moment I'm getting cURL error 7: Failed to connect to domain-2.dev port 80: Connection refused