version: "3.9"

services:
  backend:
    build:
      context: .
      dockerfile: Dockerfile.dev
    ports:
      - "8080:8080"
    volumes:
      - .:/app
      - /app/node_modules
    environment:
      - NODE_ENV=development
      - PORT=8080
    command: sh -c "npm run start"

  frontend:
    image: node:22
    working_dir: /app
    ports:
      - "5173:5173"
    volumes:
      - ./wwwroot/ibms_ems:/app
    command: sh -c "npm install && npm run dev -- --host 0.0.0.0"