Skip to content

Commit

Permalink
feat(api): remove pm2 from container (freeCodeCamp#56626)
Browse files Browse the repository at this point in the history
  • Loading branch information
ojeytonwilliams authored Oct 10, 2024
1 parent adc02ad commit b7e16b6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions docker/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ RUN pnpm install --prod --ignore-scripts -F=shared -F=api --frozen-lockfile
RUN cd api && npx prisma@$(jq -r '.devDependencies.prisma' < package.json) generate

FROM node:20-bookworm
RUN npm i -g pm2@4
USER node
WORKDIR /home/node/fcc
COPY --from=builder --chown=node:node /home/node/build/api/dist/ ./
Expand All @@ -63,4 +62,4 @@ COPY --from=deps --chown=node:node /home/node/build/node_modules/ node_modules/
COPY --from=deps --chown=node:node /home/node/build/shared/node_modules/ shared/node_modules/
COPY --from=deps --chown=node:node /home/node/build/api/node_modules/ api/node_modules/

CMD ["pm2-runtime", "start", "-i", "0","api/src/server.js"]
CMD ["node", "api/src/server.js"]

0 comments on commit b7e16b6

Please sign in to comment.