version: '3.8'

services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - "8000:8000"
    volumes:
      - .:/var/www/html
    depends_on:
      - mysql
    environment:
      - DB_HOST=mysql
      - DB_DATABASE=foundation_website
      - DB_USERNAME=root
      - DB_PASSWORD=password

  mysql:
    image: mysql:8.0
    ports:
      - "3306:3306"
    environment:
      MYSQL_ROOT_PASSWORD: password
      MYSQL_DATABASE: foundation_website
    volumes:
      - mysql_data:/var/lib/mysql

volumes:
  mysql_data: