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

# Set the working directory
WORKDIR /app

# Copy package files
COPY package*.json ./

# Install dependencies with force flag to handle any conflicts
RUN npm install -f

# Copy the rest of the application code
COPY . .

# Build the React app
RUN npm run build

# Expose port 4429 (our configured port)
EXPOSE 4429

# Set production environment
ENV NODE_ENV=production
ENV PORT=4429

# Start the application
CMD ["npm", "start"] 