Docker Compose Connections

I’m trying to set up a testing CI with Github Actions and Docker Compose. You can see the repository here:

I have a frontend on port 3000 which communicates with a backend on port 4000. I am using a testing library (Cypress) that launches predetermined tasks in an emulated browser against the frontend.

My docker setup works locally, however I can’t seem to get the networking / port mapping working correctly in the Github runner. The frontend service can’t be found on http://localhost:3000 . Even when I boot the front-end and try to curl for a response, I get a connection error.

NOTE: I am using network_mode: host to simplify the environment.

How can I configure the Github workflow to successfully connect to the frontend application?

I checked your workflow runs. The last two are successful.
It seems that you have resolved your issue with
adding network_mode: host to all the three services and mapping ports 3000:3000 , then use http://localhost:3000 to connect to the frontend service container.

If I misunderstanding your scenario, please feel free to point me out .