title: How to run/host: Multiple environments on same machine with docker-compose
body: <p>I am having 3 compose file overrides, for dev, QA, staging environments.
  I have one server and there I have to host/run containers for QA and Staging environments (completely separately !!. separate containers, network, and volumes).</p>
  
  <p>In each compose file overrides, I am having different volume names, network names, image names, container names, all controlled by environment-specific <code>.env</code> files.</p>
  
  <p>When I run <code>docker-compose -f "docker-compose.yml" -f "docker-compose.qa.yml" up -d</code>, it creates QA environment images and runs containers having name QA in it.</p>
  
  <p>When I run <code>docker-compose -f "docker-compose.yml" -f "docker-compose.staging.yml" up -d</code>, it creates Staging environment images and runs containers having name Staging in it.</p>
  
  <p>but I am not able to run both simultaneously.
  Port bindings are also controlled by <code>.env</code> files and are different for each environment.</p>
  
  <p>(I am able to specify the <code>.env</code> file I have to use during <code>docker-compose up</code> command)</p>
  
  <pre><code>services:
     service1:
       networks:
         - dev
       volumes:
         - "vol_service1:/some/path/to/container"
     service2:
       networks:
         - dev
       volumes:
         - "vol_service2:/some/path/to/container"
     service3:
       networks:
         - dev
       volumes:
         - "vol_service3:/some/path/to/container"
     service4:
       networks:
         - dev
       volumes:
         - "vol_service4:/some/path/to/container"
  
  networks:
    dev:
      driver:bridge
  
  volumes:
   vol_service1:
   vol_service2:
   vol_service3:
   vol_service4:
  </code></pre>
  
  <p>I am using Docker for Windows, following are the details:</p>
  
  <pre><code>Client: Docker Engine - Community
   Version:           18.09.2
   API version:       1.39
   Go version:        go1.10.8
   Git commit:        6247962
   Built:             Sun Feb 10 04:12:31 2019
   OS/Arch:           windows/amd64
   Experimental:      false
  
  Server: Docker Engine - Community
   Engine:
    Version:          18.09.2
    API version:      1.39 (minimum version 1.12)
    Go version:       go1.10.6
    Git commit:       6247962
    Built:            Sun Feb 10 04:13:06 2019
    OS/Arch:          linux/amd64
    Experimental:     false
  </code></pre>