Skip to content

Commit

Permalink
#2648 - Prod NPM Access fix (#2649)
Browse files Browse the repository at this point in the history
API failure in PROD due to NPM access issue

<img width="1580"
src="https://api.zenhub.com/attachedFiles/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBNmVxQWc9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--4a1fcf7fe41cdbffcbd4f809aa6e4406a726a1ba/image.png"
alt="image.png" />

This is related to
https://app.zenhub.com/workspaces/student-information-management-system-5fce9df5aa1b45000e937014/issues/gh/bcgov/sims/2535

So cherry picking the changes that went through as part of this ticket
into the new HOTFIX branch v1.2.1

Please note: NOT upgrading NPM or changing any other apps dockerfile
like workers, queue-consumers or load-test-gateway. As they are not
deployed and used in PROD env.
  • Loading branch information
guru-aot authored Jan 8, 2024
1 parent bd82130 commit 184677a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sources/packages/backend/apps/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,10 @@ RUN npm run build api
# Exposing application port
EXPOSE ${PORT}

# Grant access to group 0 to allow npm v9 to work
# See: https://docs.openshift.com/container-platform/4.11/openshift_images/create-images.html#use-uid_create-images
RUN chgrp -R 0 ./.npm && \
chmod -R g=u ./.npm

# Entry point
CMD [ "npm", "run", "start:prod:api" ]
5 changes: 5 additions & 0 deletions sources/packages/backend/apps/db-migrations/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,10 @@ COPY tsconfig.json ./
COPY tsconfig.build.json ./
COPY env-setup.js ./

# Grant access to group 0 to allow npm v9 to work
# See: https://docs.openshift.com/container-platform/4.11/openshift_images/create-images.html#use-uid_create-images
RUN chgrp -R 0 ./.npm && \
chmod -R g=u ./.npm

# Entry point
CMD [ "npm", "run", "start:prod:db-migrations" ]

0 comments on commit 184677a

Please sign in to comment.