Deploying frontend and configuring with backend containers

Hello, i am trying to deploy the erpnext containers on docker container app in same container environment but the frontend(nginx) is unable to make connections with the backend proxy, the curl request works fine but in proxy things it gives errors like timeout, upstream closed prematurely etc. i just want to find out what can be the standard way to deploy and get the frontend running, what should i set for the environment variables in UPSTREAM_REAL_IP_ADDRESS=127.0.0.1

i have a containers named backend and frontend in same container environments, they can successfully call each other via curl. i haven’t yet setted up the domain names for my company so they call each other via container names like http://backend. there seems like issue in security or ip address thing.

this was one of the error i got
upstream prematurely closed connection while reading upstream, client: 100.100.0.124, server: backend, request: “GET / HTTP/1.1”, upstream: “http://100.100.255.127:8000/”, host: “frontend.xxx.southindia.azurecontainerapps.io”, referrer: “https://sandbox-2.reactblade.portal.azure.net/

if anyone of you have successfully setted up the frontend proxy and backend then please let me know what to put in the various enviroment variables for different servers not in same vnet or domain etc.

thanks