Skip to content

Commit

Permalink
fix(prod): Make backend user in docker own node_modules
Browse files Browse the repository at this point in the history
  • Loading branch information
GordiNoki committed Aug 17, 2024
1 parent 3053694 commit 9488cc0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prod/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ COPY ../libs/db/src/prisma/ ./prisma/

RUN chown -R backend:backend .

USER backend
RUN npm --omit=dev --ignore-scripts install
RUN node_modules/.bin/prisma generate --schema ./prisma/schema.prisma

RUN rm package.json package-lock.json
COPY ./prod/package.json .
COPY --chown=backend ./prod/package.json .

USER backend
CMD [ "npm", "run", "start" ]

0 comments on commit 9488cc0

Please sign in to comment.