version: '3.3'
services:
  php-fpm:
    container_name: php
    build:
      context: ./docker/php
    volumes:
      - ./:/var/www/app
      - ./docker/php/conf.d/php.ini:/usr/local/etc/php/conf.d/app.ini
      - ./docker/php/php-fpm.d/www.conf:/usr/local/etc/php-fpm.d/www.conf

  nginx:
    container_name: webserver
    build:
      context: ./docker/nginx
    volumes:
      #- /var/www/app
      - /var/www/app/mysql
      - ./:/var/www/app
      - ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
      - ./docker/nginx/sites/:/etc/nginx/sites
      - ./docker/nginx/conf.d/:/etc/nginx/conf.d
      - ./doc/cert:/etc/nginx/ssl
      - /var/www/log
    ports:
      - 82:80
      - 444:443
  db_driver:
    image: mysql:5.7
    #build:
     # context: ./docker/mysql
    container_name: mysql_dev
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: helloworld
      MYSQL_DATABASE: testapp
      MYSQL_USER: root
      MYSQL_PASSWORD: root

