version: '3'

services:

  nginx:
    image: nginx:1.11-alpine
    ports:
    - 80
    volumes:
    - ./etc/docker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf
    - .:/app
    depends_on:
    - php

  php:
    working_dir: /app
    build:
      context: ./etc/docker/php
    expose:
    - 9000
    volumes:
    - .:/app

  composer:
    build: ./etc/docker/composer
    volumes:
    - composer-data:/composer
    - .:/app:cached

volumes:
  composer-data:
    driver: local
