FROM node:20-alpine

# Set working directory
WORKDIR /app

# Copy package files first for better caching
COPY package*.json /app/

# Install dependencies
RUN npm install

# Copy application code
COPY . /app/

# Expose port
EXPOSE 5173

# Run dev server (for development/debug)
CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"]
