db:
  container_name: <%= projectName %>_<%= environment %>_db
  extends:
    file: docker-compose.yml
    service: db
  volumes:
    - /data/<%= projectName %>_<%= environment %>/mysql:/var/lib/mysql
<% if (cache.external) { %>
cache:
  container_name: <%= projectName %>_<%= environment %>_cache
  extends:
    file: docker-compose.yml
    service: cache
<% } %><% if (proxy.exists) { %>
proxy:
  container_name: <%= projectName %>_<%= environment %>_proxy
  image: phase2/varnish4
  environment:
    VARNISH_BACKEND_HOST: www
    VIRTUAL_HOST: ${DOCKER_ENV}.atmos.ci.p2devcloud.com
  links:
    - www
<% } %>
www:
  container_name: <%= projectName %>_<%= environment %>_www
  image: <%= app.image %>
  environment:
    DOCROOT: /var/www/build/html
    PHP_XDEBUG: "<%= debugMode %>"
    PHP_XHPROF: "<%= debugMode %>"
    <% if (!proxy.exists) { %>VIRTUAL_HOST: <%= virtualHost %><% } %>
  links:
    - db<% if (cache.external) { %><%= cache.docker.link %><% } %>
  volumes:
    - .:/var/www/
    - /data/<%= projectName %>_<%= environment %>/files:/var/www/build/html/sites/default/files

db:
  container_name: <%= projectName %>_<%= environment %>_db
  extends:
    file: docker-compose.yml
    service: db
  volumes:
    - /data/<%= projectName %>_<%= environment %>/mysql:/var/lib/mysql
<% if (cache.external) { %>
cache:
  container_name: <%= projectName %>_<%= environment %>_cache
  extends:
    file: docker-compose.yml
    service: cache
<% } %><% if (proxy.exists) { %>
proxy:
  container_name: <%= projectName %>_<%= environment %>_proxy
  image: phase2/varnish4
  environment:
    VARNISH_BACKEND_HOST: www
    VIRTUAL_HOST: <%= virtualHost %>
  links:
    - www
<% } %>
www:
  container_name: <%= projectName %>_<%= environment %>_www
  image: <%= app.image %>
  environment:
    DOCROOT: /var/www/build/html
    PHP_XDEBUG: "<%= debugMode %>"
    PHP_XHPROF: "<%= debugMode %>"
    <% if (!proxy.exists) { %>VIRTUAL_HOST: <%= virtualHost %><% } %>
  links:
    - db<% if (cache.external) { %><%= cache.docker.link %><% } %>
  volumes:
    - .:/var/www/
    - /data/<%= projectName %>_<%= environment %>/files:/var/www/build/html/sites/default/files

Fix virtualHost entry for devcloud environments.
Fix virtualHost entry for devcloud environments.
