services:
  ikario_body_frontend:
    image: node:20
    working_dir: /app
    volumes:
      - ./generations/ikario_body:/app
      # Eviter de réutiliser les node_modules Windows dans le conteneur Linux
      - /app/node_modules
    command: ["sh", "-c", "npm install && npm run dev -- --host 0.0.0.0 --port 3000"]
    ports:
      - "4300:3000"
    environment:
      - NODE_ENV=development
      - DOCKER_ENV=true

  ikario_body_server:
    image: node:20
    working_dir: /app/server
    volumes:
      - ./generations/ikario_body:/app
      # Eviter de réutiliser les node_modules Windows dans le conteneur Linux
      - /app/server/node_modules
    command: ["sh", "-c", "npm install && npm start"]
    ports:
      - "4301:3001"
    environment:
      - NODE_ENV=development
    depends_on:
      - ikario_body_frontend

