version: '2'

services:
  php:
    build: ./_images/fpm
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ./src:/var/www/code:rw
    environment:
      - DEVELOPMENT=1
    networks:
      - default
      - xyz-tier

  web:
    image: nginx:stable
    volumes:
      - ./_conf/nginx/sites:/etc/nginx/conf.d:ro
      - ./src:/var/www/code:ro
    labels:
      traefik.enable: "true"
      traefik.frontend.rule: Host:addcpm-json.app.dev.rew.to
      traefik.docker.network: dproxy_front-tier
    networks:
      - default
      - front-tier

networks:
  front-tier:
    external:
      name: dproxy_front-tier
  xyz-tier:
    external:
      name: addcpm_default
