version: "3.9"

services:
  db:
    image: mysql
    container_name: db-mysql
    restart: always
    command: --default-authentication-plugin=mysql_native_password
    environment:
      MYSQL_ROOT_PASSWORD: root
    ports:
     - "3306:3306"

  back-end:
    image: node
    container_name: back-end-node
    restart: always
    depends_on:
     - db
    ports:
     - "3000:3000"
     - "3002:3002"
     - "3001:3001"
    volumes:
     - .:/var/www
    build:
        context: .
        dockerfile: Dockerfile
