title: Can't curl between two containers
body: <p>I have trouble getting my two containers to communicate. I have 2 separate <code>docker-compose.yml</code> files in different projects.</p>
  
  <p>First one is:</p>
  
  <pre><code>version: '2'
  
  services:
    myapp:
      tty: true
      image: 'bitnami/laravel:latest'
      labels:
        kompose.service.type: nodeport
      ports:
        - 3000:3000
      expose:
        - "3000"
      volumes:
        - ./:/app
  
  networks:
    default:
      external:
        name: "laravel"
  </code></pre>
  
  <p>And second one:</p>
  
  <pre><code>  app:
      build:
        context: .
        dockerfile: ./docker/app/Dockerfile
      image: bla/bla
      container_name: my-app
      ports:
        - "80:80"
        - "443:443"
  
  networks:
    default:
      external:
        name: "laravel"
  </code></pre>
  
  <p>When going to browser or making a curl from terminal to <code>localhost:3000</code> I get the response back. If I enter the <code>myapp</code> container I can also curl (which is really not strange). </p>
  
  <p>But I can't make it so that I enter the <code>app</code> container and get a response. Instead I am getting: </p>
  
  <blockquote>
    <p>curl: (7) Failed to connect to localhost port 3000: Connection refused</p>
  </blockquote>