# Use Node.js 22 Alpine as the base image
FROM node:lts-alpine3.21

# Set the working directory in the container
WORKDIR /app

# Copy package.json and package-lock.json
COPY package*.json ./

# Install dependencies
RUN npm install

# Copy the rest of the application code
COPY . .


# Install a simple HTTP server for serving static content
RUN npm install -g http-server

# Expose the port the app runs on
EXPOSE 3000
# Start the application
CMD ["node", "backend/server.js"]
