-
Notifications
You must be signed in to change notification settings - Fork 2.4k
refactor: optimize Dockerfile for web and space applications by refin… #7223
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
Conversation
…ing COPY commands for static assets
WalkthroughThe Dockerfiles for both the Changes
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
space/Dockerfile.space
(1 hunks)web/Dockerfile.web
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Analyze (javascript)
🔇 Additional comments (2)
web/Dockerfile.web (1)
106-106
: Add EXPOSE 3000 for consistency
IncludingEXPOSE 3000
aligns the Web Dockerfile with the Space variant and the Next.js default port.space/Dockerfile.space (1)
59-61
: Approve targeted asset copying
Great optimization—only.next/static
andpublic
are included in the runner, reducing image size. Ensure the standalone build doesn’t require other.next
subdirectories at runtime.Please verify by launching a container and confirming that all routes and static assets serve correctly without the full
.next
directory.
… asset paths and improve structure
@lifeiscontent this might be of interest to you |
This reduces:
The existing web-enterprise from 2.57GB to 517MB
The existing space-enterprise from 1.13GB to 406MB
Description
Type of Change
Screenshots and Media (if applicable)
Test Scenarios
References
Summary by CodeRabbit
Summary by CodeRabbit