services:
  frontend:
    build: 
      context: ./frontend
      dockerfile: Dockerfile.dev
    environment:
      - NODE_ENV=development
    volumes:
      - ./frontend:/app
      - frontend_node_modules:/app/node_modules
    ports:
      - "3010:5173"
    depends_on:
      - backend
    restart: always


  backend:
    build:
      context: ./backend
    command: npm run dev
    volumes:
      - ./backend:/app
      - backend_node_modules:/app/node_modules
    ports:
      - "5000:5000"
    env_file:
      - ./backend/.env
    restart: always

volumes:
  frontend_node_modules:
  backend_node_modules:
