So trying to setting nginx as a reverse proxy using docker - I have three node js containers (one frontend and two backend services) the frontend service calls the two backend services. So I want nginx to redirect to the frontend (which is web application), but every time I try to send something I get a 502 bad gateway error. When I directly exec into the docker containers I can ping the other containers via dns_hostname or ip address (which I grab from docker inspect). I've attached an edited version of both my docker-compose.yaml and my nginx.conf (only renamed a few things to make them look a bit more generic etc.)
I've almost done everything to rule out a networking issue, as I can ping both the ip address and the frontend docker hostname from the inside of the nginx container (using docker exec -it nginx-proxy sh) is anyone has any suggestions on what to try next or they can see clearly if I'm doing something wrong it would be much appreciated.
I've almost done everything to rule out a networking issue, as I can ping both the ip address and the frontend docker hostname from the inside of the nginx container (using docker exec -it nginx-proxy sh) is anyone has any suggestions on what to try next or they can see clearly if I'm doing something wrong it would be much appreciated.