version: "3.1"
services:
    db:
      image: mysql:5.7
      container_name: docker-creages-mysql
      working_dir: /application
      volumes:
        - .:/application
      environment:
        - MYSQL_ROOT_PASSWORD=root
      ports:
        - "8002:3306"

    phpmyadmin:
      image: phpmyadmin/phpmyadmin
      restart: always
      links:
        - db
      ports:
        - 8184:80
      environment:
        PMA_HOST: db

    webserver:
      image: nginx:alpine
      container_name: docker-creages-webserver
      working_dir: /application
      volumes:
          - .:/application
          - ./phpdocker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf
      ports:
       - "8000:80"

    php-fpm:
      build: phpdocker/php-fpm
      container_name: docker-creages-php-fpm
      working_dir: /application
      volumes:
        - .:/application
        - ./phpdocker/php-fpm/php-ini-overrides.ini:/etc/php/7.2/fpm/conf.d/99-overrides.ini

    node:
      image: node:8
      working_dir: /application
      volumes:
        - .:/application
      tty: true
