FROM node:20-slim

WORKDIR /app

# Copy package files
COPY package.json yarn.lock* ./

# Install dependencies
RUN yarn install

# Copy application source code
COPY . .

# Expose rsbuild dev server port (default 3000)
EXPOSE 3000

# Default command
CMD ["sh", "-c", "yarn build && yarn watch:build"]
