version: "3.8"
services:
  server:
    build:
      context: .
      dockerfile: Dockerfile.server
    env_file:
      - .env
      - apps/server/.env
    ports:
      - "3000:3000"
    volumes:
      - ./apps/server:/app/apps/server
      - ./packages/shared:/app/packages/shared
      - ./data:/app/data
    command: ["pnpm","--filter","@app/server","dev"]
    depends_on: []

  web:
    build:
      context: .
      dockerfile: Dockerfile.web
    env_file:
      - .env
      - apps/web/.env
    ports:
      - "5173:5173"
    volumes:
      - ./apps/web:/app/apps/web
      - ./packages/shared:/app/packages/shared
    command: ["pnpm","--filter","@app/web","dev"]
    depends_on:
      - server
