From 5e2481b7540a0e0b96fe695d52013dc83ddbe6e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ewilan=20Rivi=C3=A8re?= Date: Thu, 4 Jul 2024 07:37:12 +0200 Subject: [PATCH] chore: Update Dockerfile to use Node.js 20.15.0-alpine and install pm2 globally --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0922231..bb2f114 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:18.16.0-alpine +FROM node:20.15.0-alpine RUN mkdir -p /usr/src/app WORKDIR /usr/src/app @@ -7,6 +7,7 @@ RUN apk update && apk upgrade RUN apk add git COPY . /usr/src/app/ +RUN npm install pm2 -g RUN npm install -g pnpm RUN pnpm install RUN pnpm build @@ -15,4 +16,4 @@ ENV HOST=0.0.0.0 EXPOSE 3000 -CMD [ "pnpm", "start" ] +CMD ["pm2-runtime", "start", "./dist/node.js"]