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?