Getting bad gateway error on http setup


My setup is in GCP instance. Trying to setup retool without domain name. Ok to access with public IP attached to it. Upon running the docker command I am getting 502 bad gateway for the path http://<public_ip>/auth/signup

The error is
2024/05/07 13:15:32 [error] 196#196: *6 connect() failed (111: Connection refused) while connecting to upstream, client: <client_ip>, server: <server_ip>, request: "GET /auth/signup HTTP/2.0", upstream: "", host: <server_ip>