version: '3'

services:
  db:
    image: mysql:8.0.21
    restart: always
    depends_on:
      - web
    environment:
      MYSQL_DATABASE: pegafull
      MYSQL_USER: root
      MYSQL_PASSWORD: sqlserver
      MYSQL_ROOT_PASSWORD: sqlserver
    ports:
      - "3306:3306"
    volumes:
      - db_data:/var/lib/mysql
  web:
    build:
      context: .
      dockerfile: Dockerfile
    volumes:
      - .:/var/www/html/
    ports:
      - 80:80
volumes:
  db_data:


