Dockerfile
FROM node:16.14.2
RUN mkdir /data/apps -pv \
&& npm -g i [email protected] \
&& npm -g i pm2
WORKDIR /data/apps
COPY . .
RUN pnpm install \
&& pnpm build
EXPOSE 5000
CMD ["pm2-runtime", "ecosystem.config.yaml"]
FROM node:16.14.2
RUN mkdir /data/apps -pv \
&& npm -g i [email protected] \
&& npm -g i pm2
WORKDIR /data/apps
COPY . .
RUN pnpm install \
&& pnpm build
EXPOSE 5000
CMD ["pm2-runtime", "ecosystem.config.yaml"]