title: Docker-compose: keep on getting can't "This site can’t be reached
body: <p>I'm kind of new to this. I'm trying to dockerize my node js application </p>
  
  <p>I've created a Docker File</p>
  
  <pre><code>FROM node:7
  # Working directory for application
  WORKDIR /usr/src/app
  # Binds to port 7777
  EXPOSE 7777
  # Creates a mount point
  VOLUME [ "/usr/src/app" ]
  </code></pre>
  
  <p>and this is my docker-compose.yml file</p>
  
  <pre><code>version: "2"
  services:
    redis:
      image: "redis"
    postgres:
      image: "postgres:9.4"  
    web:
      build: .
      ports:
       - "4000:4000"
      volumes:
       - .:/usr/src/app
      depends_on:
        - postgres
        - redis
      command: ["npm", "start"]
  </code></pre>
  
  <p>Now I ran docker-compose up -d and I'm not getting any error. But the problem is when I try to access it using this url <code>0.0.0.0:4000</code> it throws me this error "this site can't be reached"</p>
  
  <p>Can you guys help me out thanks</p>
  
  <p>**UPDATE: **</p>
  
  <p>I have found the ip using this command </p>
  
  <pre><code>docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}'  helloworld_web_1
  </code></pre>
  
  <p>which is this --> <code>172.21.0.4</code></p>
  
  <p>but when I try to access it using the above URL it still <code>http://172.21.0.4:4000/</code></p>
  
  <p>it still refuses to connect</p>