update dockerfile

This commit is contained in:
TDLaouer 2025-07-13 22:46:26 +02:00
parent 7678967831
commit 8e1a1bf5af

View File

@ -1,9 +1,11 @@
FROM node:22-alpine AS build
ARG NODE_VERSION=22.16.0
FROM node:${NODE_VERSION}-slim as base
FROM base as build
WORKDIR /app
RUN corepack enable
RUN npm install -g pm2
# Copy package.json and your lockfile, here we add pnpm-lock.yaml for illustration
@ -13,11 +15,15 @@ COPY package*.json ./
RUN npm i
# Copy the entire project
COPY . .
COPY --link . .
# Build the project
RUN npm run build
FROM base
COPY --from=build /src/.output /src/.output
# Change the port and host
ENV PORT=3001