1

I am trying to develop an app with apollo graphql server and react. i susbscribe to apollo server from react container(visualization) and consume data. If i map ports of apollo server, i can connect to apollo server and react app works fine but if i expose port in docker compose file, connection fails. I cant understand why this happens, normally within the same network containers can talk each other and i haven't faced similar problems before

Compose File With Expose

enter image description here

Error

enter image description here

Compose File With Port

enter image description here

No Error works fine:

enter image description here

  • Solution to problem is as described in the link [Web Container Cannot Call Backend Container](https://stackoverflow.com/questions/60986908/web-container-cannot-call-backend-container-from-docker-compose) – mehmet emin çukur Oct 12 '21 at 15:21

0 Answers0