chore: using pm2 in Dockerfile (#423)

This commit is contained in:
Kind Jeff 2023-04-24 19:12:44 +08:00 committed by GitHub
parent 1d703050b9
commit 3a8b501bbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -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"]