From 8e1a1bf5af3c41ed088a76e45641452f2771945c Mon Sep 17 00:00:00 2001 From: TDLaouer Date: Sun, 13 Jul 2025 22:46:26 +0200 Subject: [PATCH] update dockerfile --- Dockerfile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5e3d84f..ae02d7e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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