title: Docker-compose networking, access host port from container
body: <p>This is my compose file:</p>
  
  <pre><code>version: '3'
  services:
    web:
      container_name: dash
      build: 
        context: .
        dockerfile: Dockerfile
        args:
          webpackVersion: 2.2.1
          nodeVersion: "6.x"
      ports:
        - "3036:3036"
      links:
        - mongodb:dbhost
      depends_on:
        - mongodb
    mongodb:
      container_name: mongodb
      build:
        context: .
        dockerfile: Dockerfile-mongodb
  </code></pre>
  
  <p>Right now <code>web</code> has access to <code>mongodb</code> container where I keep app configs. But I also need to be able access port 3306 on my local machine where I'm running docker-compose, from <code>web</code>.</p>
  
  <p>I tried to follow the documentation, but I'm new in docker so it looks pretty complicated for me, how to use networking in docker-compose. </p>
  
  <p>If any one can help me to understand this I'll be really grateful!</p>