title: Why isnt my container joining an existing network in docker-compose?
body: <p>I have a simple app that i am trying to connect to an existing network which exists, but when i do <code>docker-compose up</code> it is just creating a new network for itself without joining the existing network. The existing network I am trying to join is for traefik which is called proxy. All my other services running behind traefik is working fine. I have to manually add mynewapp to the proxy network for it to work. All my other services compose files are also decoupled in individual folders, so I dont think thats it. </p>
  
  <p>I tried defining external and internal values to true and false, but it still creates its own network. If i define a default network along with the proxy network, then it just creates two new networks called mynodeapp_default and mynodeapp_proxy. If i run <code>docker network inspect proxy</code>, I dont see mynewapp in it (but I see all my other running services).</p>
  
  <p>The output of my <code>docker network list</code> is </p>
  
  <pre><code>62eba8d7e127        proxy                 bridge              local
  a50cdb97b743        testapp_proxy         bridge              local
  </code></pre>
  
  <p>What am I doing wrong here?</p>
  
  <pre><code>version: '3'
  
  services: 
    mynodeapp:
      container_name: mynodeapp
      build: .
      volumes:
        - ./:/app/
      networks: 
        - proxy
      labels: 
        - traefik.enable=true
        - traefik.network=proxy
  
  networks: 
    proxy:
  </code></pre>