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