From 3a8b501bbde1fbf20d1a0b517e0b9eb77aa6fb09 Mon Sep 17 00:00:00 2001 From: Kind Jeff Date: Mon, 24 Apr 2023 19:12:44 +0800 Subject: [PATCH] chore: using pm2 in Dockerfile (#423) --- Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 50e42312..32eadeb3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM node:18-bullseye-slim as base RUN apt-get update || : && apt-get install python3 build-essential git -y -RUN npm i -g pnpm +RUN npm i -g pnpm pm2 ##### DEPS FROM base as deps @@ -46,5 +46,4 @@ COPY --from=build /app/public /app/public COPY --from=build /app/.next/static /app/.next/static COPY --from=build /app/prisma /app/prisma -CMD ["pnpm", "start"] - +CMD ["pm2-runtime", "start", "pnpm", "--", "start", "-i", "2"]