version: '3'

services:
  web:
    build: .
    volumes:
      - .:/app
    ports:
      - "6010:8000"
    depends_on:
      - db
    environment:
      - DATABASE_HOST=db
      - DATABASE_NAME=mis
      - DATABASE_USER=root
      - DATABASE_PASSWORD=root

  db:
    image: mysql:5.7
    command: --default-authentication-plugin=mysql_native_password
    volumes:
      - mysql_data:/var/lib/mysql
      - ./Install/SQL:/docker-entrypoint-initdb.d
    environment:
      - MYSQL_DATABASE=mis
      - MYSQL_ROOT_PASSWORD=root
      - MYSQL_PASSWORD=root

volumes:
  mysql_data:
