FROM node:22.16.0 AS base

RUN corepack enable

# set work directory
WORKDIR /app

# install project dependencies
# copy package.json and package-lock.json files
COPY package*.json ./

# copy project source code
COPY . .
# install dependencies
RUN npm install --ignore-scripts

# expose port
EXPOSE 3000

# start service
CMD ["npm", "run", "dev"]
