title: github workflow: "ECONNREFUSED 127.0.0.1:***" error when connecting to docker container
body: <p>In my github actions workflow I am getting this error (ECONNREFUSED) while running my jest test script. The test uses axios to connect to my api which is running in a container bootstrapped via docker-compose (created during the github workflow itself). That network has just has 2 containers: the api, and postgres. So my test script is, I am assume, on the &quot;host network&quot; (github workflow), but it couldn't reach the docker network via the containers' mapped ports.</p>
  <ul>
  <li>I then skipped jest test entirely and just tried to directly ping the containers. Didn't work.</li>
  <li>I then modified the workflow to inspect the default docker network that should have been created:</li>
  </ul>
  <h2>UPDATE 1</h2>
  <p>I've narrowed down the issue as follows. When I modified the compose file to rely on the default network (i no longer have a <code>networks:</code> in my compose file):</p>
  <p><a href="https://i.stack.imgur.com/TkOfv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TkOfv.png" alt="Screenshot of network description" /></a></p>
  <p>So it looks as though the containers were never attached to the default bridge network.</p>
  <h2>UPDATE 2</h2>
  <p>It looks like I just have the wrong paradigm. After reading this: <a href="https://help.github.com/en/actions/configuring-and-managing-workflows/about-service-containers" rel="nofollow noreferrer">https://help.github.com/en/actions/configuring-and-managing-workflows/about-service-containers</a>
  I realise this is not how GA expects us to instantiate containers at all. Looks like I should be using <code>services:</code> nodes inside the workflow file, not using containers from my own docker-compose files.  Gonna try that...</p>