version: '3.8'

services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - "8000:80"
    volumes:
      - ./app:/var/www/html/app
      - ./public:/var/www/html/public
      - ./storage:/var/www/html/storage
    environment:
      - APP_ENV=local
      - APP_DEBUG=true
      - DB_CONNECTION=mysql
      - DB_HOST=db
      - DB_PORT=3306
      - DB_DATABASE=your_database
      - DB_USERNAME=your_username
      - DB_PASSWORD=your_password

  db:
    image: mysql:5.7
    ports:
      - "3306:3306"
    environment:
      - MYSQL_ROOT_PASSWORD=root_password
      - MYSQL_DATABASE=your_database
      - MYSQL_USER=your_username
      - MYSQL_PASSWORD=your_password
    volumes:
      - db_data:/var/lib/mysql

volumes:
  db_data: