I have a Sping app running on render.com inside docker with port 8080 exposed (
EXPOSE 8080 inside Dockerfile), it can be accessed successfully via external url and custom domain I assigned to it.
And I have a Next.js app with SSR and I wound like to access Spring app from it via internal address.
How do I do that? Both services are in the same region.
I can wget my frontend app from backend one using
wget service-frontend:10000 and receive 500 error code, since frontend can’t connect to the backend.
But I can’t access backend from frontend.
I tried using both http://service-backend:8080 and service-backend:8080, I tried port 80 and no port at all.
All I get is:
render@srv-long-id:~/project/src$ wget service-backend:8080 --2021-07-06 19:05:58-- http://service-backend:8080/ Resolving service-backend (service-backend)... 10.xxx.xxx.76 Connecting to webcam-backend (service-backend)|10.xxx.xxx.76|:8080... failed: Connection refused.
Thanks in advance!