version: '3'
services:
  web:
    build:
      context: .
      dockerfile: .docker/web/Dockerfile
    ports:
      - ${DOCKER_WEB_PORT}:80
    environment:
      DB_HOST: mysql
    volumes:
      - .:/var/www/html

  mysql:
    image: mysql:5.7
    environment:
      MYSQL_USER: ${DB_USERNAME}
      MYSQL_PASSWORD: ${DB_PASSWORD}
      MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
      MYSQL_DATABASE: ${DB_DATABASE}
    ports:
      - ${DOCKER_MYSQL_PORT}:3306
