I have a web app serving publicly in a port and access an API both in the same Container Service. I am trying to use SERVICE_CON service://localhost as suggested by documentation but it is not working. Any clue? I can see both logs for containers look good, both on steady state serving on both ports.
I use that as the VITE_BASE_URL in the client app to access the API endpoints but the browser complains saying:
service://localhost:3001/api/myassessment ----> URL scheme "service" is not supported.
If anyone has any idea how to fix this, I would appreciate your comments. I also tried using **nginx **to proxy pass the access to API but using the private domain for my container service does not work as expected.
I tried using SERVICE_CON but AWS Lightsail documentation is very vague on that and it is hard to tell I am doing it right with my configuration on the UI.
I tried using proxy_pass with nginx since my only public container is the web app. So any api call would be caught and pass to:
- http://service_name:3001 OR
- http://private_domain:3001
Any other alternative I can try? Thanks