# Use Node.js 18 Alpine as base image
FROM node:18-alpine

# Set working directory
WORKDIR /app

# Copy package files
COPY package*.json ./

# Install dependencies
RUN npm install

# Copy source code
COPY . .

# Expose the development port (Vite default)
EXPOSE 8080

# Set environment to development
ENV NODE_ENV=development

# Command to run the development server
CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"]