I'm going crazy trying to have multiple containers communicating together. Let me explain my infrastructure and problem with this simple diagram.
I can correctly access both my "DASHBOARD" container on localhost:3000 and my "API" container on localhost:800 through my browser but if I hit my reverse proxy through localhost:8088 I get a 502 error.
It seems that from the Reverse Proxy Nginx container I can't reach on its network the other container and that even with the different port it tries to connect to himself.
FYI, those 2 environments are built with 2 different docker-compose and I would like to keep those 2 apps separated.
What am I missing on the network side?
Here is my reverse proxy piece on the Nginx config
location /api/v1/ {
proxy_pass http://localhost:8000/api/v1/;
proxy_http_version 1.1;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
Thanks for your help.