# Base image for Node.js
FROM node:18-slim

# Set work directory
WORKDIR /home/app/web

# Install dependencies
COPY package*.json ./
RUN npm install

# Copy the project files (optional, since we'll use a bind mount for hot swapping)
COPY . .

# Set environment variables for Next.js
ENV NODE_ENV=development

# Expose the port Next.js will run on
EXPOSE 3000

# Command to run the Next.js development server
CMD ["npm", "run", "dev"]
