version: '3.7'
services:

    nginx:
        container_name: nginx
        image: nginx:1.17
        restart: always
        ports:
            - "80:80"
        volumes:
            - ../:/var/www
            - ./nginx/backend.conf:/etc/nginx/conf.d/backend.conf
        links:
            - php
    php:
        container_name: php
        build:
            context: .
            dockerfile: Dockerfile
        restart: always
        volumes:
            - ../:/var/www

    composer:
        container_name: composer
        image: composer:latest
        command: tail -f /dev/null
        volumes:
            - ../:/var/www
