title: cypress can't verify server running on localhost even though I can see it in browser and have instituted a wait check for localhost
body: <p>I'm attempting to adapt <a href="https://github.com/cypress-io/cypress-example-docker-compose" rel="nofollow noreferrer">this example</a> to my own environment, which very closely mirrors this codebase, but getting a:</p>
  <pre><code>cypress      | Cypress could not verify that this server is running:
  cypress      | 
  cypress      |   &gt; http://client
  cypress      | 
  cypress      | We are verifying this server because it has been configured as your baseUrl.
  cypress      | 
  cypress      | Cypress automatically waits until your server is accessible before running tests.
  cypress      | 
  cypress      | We will try connecting to it 3 more times...
  cypress      | We will try connecting to it 2 more times...
  cypress      | We will try connecting to it 1 more time...
  cypress      | 
  cypress      | Cypress failed to verify that your server is running.
  cypress      | 
  cypress      | Please start this server and then run Cypress again.
  </code></pre>
  <p>given this docker-compose.yml in the root:</p>
  <pre><code>client:
      image: graceland/client_dev
      networks:
        - allhosts
      volumes:
        # this is where our code is mounted into the running container
        - ./client/:/client
        - ./shared/:/client/src/shared-copied # see shared-copied.md
      working_dir: /client
      command: yarn start
      environment:
        PORT: 3000
      ports:
        - &quot;3000:3000&quot;
  e2e:
      #image: &quot;cypress/included:10.6.0&quot;
      image: &quot;cypress&quot;
      build: ./e2e
      container_name: cypress
      depends_on:
        - client
      environment:
        - CYPRESS_baseUrl=http://client
      command: [&quot;./wait-for-it.sh&quot;, &quot;-t&quot;,&quot;30&quot;,&quot;http://localhost:3000&quot;, &quot;--&quot;, &quot;npx&quot;,&quot;cypress&quot;,&quot;run&quot;]
  
      volumes:
        - ./e2e/cypress:/app/cypress
        - ./e2e/cypress.config.js:/app/cypress.config.js
        - ./e2e/wait-for-it.sh:/app/wait-for-it.sh
  </code></pre>
  <p>and this <code>cypress.config.js</code> in the <code>/e2e</code> folder:</p>
  <pre><code>const { defineConfig } = require(&quot;cypress&quot;);
  
  module.exports = defineConfig({
    e2e: {
      baseUrl: &quot;http://localhost:3000&quot;,
      supportFile: false,
    },
  });
  </code></pre>
  <p>any idea what's going on here? Running this on my local machine with <code>docker-compose up</code> - and I can see <code>http://localhost:3000</code> in my browser.</p>