-
-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Optimized the API Dockerfile for better build time. #527
base: develop
Are you sure you want to change the base?
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
@kash2104 remember to tag your pr when you create your pr. |
apps/api/Dockerfile
Outdated
|
||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \ | ||
pnpm install --ignore-scripts --frozen-lockfile && \ | ||
rm -rf /root/.npm /root/.node-gyp /tmp/npm-* | ||
pnpm install --ignore-scripts --frozen-lockfile && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use some tabs in here to ensure proper formatting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rajdip-b I changed the app location to /app. Since this Dockerfile is for api, do we need the packages and root package.json? |
The compiled version should have all the necessary dependencies. That would go into the 2nd stage. So i believe that you wont actually need to manually delete anything. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
User description
Fixes #176
Description
Fixes #[176]
Dependencies
N/A
Future Improvements
N/A
Mentions
@rajdip-b
Screenshots of relevant screens
N/A
Developer's checklist
If changes are made in the code:
Documentation Update
PR Type
enhancement
Description
COPY
commands to improve Docker caching efficiency, which can lead to faster build times.NODE_ENV
toproduction
to ensure the production environment is correctly configured.USER node
command in the build stage as it was unnecessary.Changes walkthrough 📝
Dockerfile
Optimize Dockerfile for improved build performance and security
apps/api/Dockerfile