version: "3.9"

services: 
  web:
    container_name: ncba_raffle_tool
    build: 
      context: .
      dockerfile: Dockerfile
    depends_on:
      - db
    volumes: 
      - .:/app
    ports: 
      - 8006:8000 
  db:
    container_name: ncba_raffle_db
    platform: linux/x86_64
    image: mysql:8.0
    command: --default-authentication-plugin=mysql_native_password
    restart: always
    environment: 
      MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
      MYSQL_DATABASE: ${DB_DATABASE}
      MYSQL_PASSWORD: ${DB_PASSWORD}
    ports: 
      - 3310:3306
    volumes:
      - ./data-volume:/var/lib/mysql