# Use an official Node.js runtime as the base image
FROM node:18-alpine AS base

# Set the working directory in the container
WORKDIR /app

# Copy the package.json and package-lock.json to the working directory
COPY package*.json ./

# Install npm dependencies
RUN npm install --force

# Copy the rest of your application code to the working directory
COPY . .

# Expose the port your application is listening on (if any)
EXPOSE 3000

RUN npm run build:dev

# Start the application with "npm run dev"
CMD ["npm", "run", "start"]