version: '3.8'

services:
  db:
    image: p2-was-db
    build:
      context: .
      dockerfile: Dockerfile
    container_name: p2-was-mysql
    ports:
      - "3306:3306"
    environment:
      MYSQL_ROOT_PASSWORD: "${DB_ROOT_PASSWORD}"
      MYSQL_DATABASE: "${DB_NAME}"
      MYSQL_USER: "${DB_USER}"
      MYSQL_PASSWORD: "${DB_PASSWORD}"
    volumes:
      - ./init.sql:/docker-entrypoint-initdb.d/init.sql
