-
Notifications
You must be signed in to change notification settings - Fork 195
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
🐛 Added docker port on API Container #472
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Important Review skippedReview was skipped due to path filters Files ignored due to path filters (3)
You can disable this status message by setting the WalkthroughRecent updates to the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
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 as PR comments)
Additionally, you can add CodeRabbit Configration 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.
PR Summary
- Added EXPOSE instruction for port 3000 in Dockerfile
- Ensures API container is accessible on port 3000
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
Outside diff range and nitpick comments (3)
packages/api/Dockerfile (3)
Line range hint
6-6
: Pin versions inapk add
to ensure reproducibility.- RUN apk add --no-cache libc6-compat + RUN apk add --no-cache libc6-compat=<version>
Line range hint
22-22
: Pin versions inapk add
to ensure reproducibility.- RUN apk add --no-cache libc6-compat + RUN apk add --no-cache libc6-compat=<version>
Line range hint
45-45
: Pin versions inapk add
to ensure reproducibility.- RUN apk add --no-cache libc6-compat netcat-openbsd curl + RUN apk add --no-cache libc6-compat=<version> netcat-openbsd=<version> curl=<version>
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- packages/api/Dockerfile (1 hunks)
Additional context used
Hadolint
packages/api/Dockerfile
[warning] 6-6: Pin versions in apk add. Instead of
apk add <package>
useapk add <package>=<version>
[info] 7-7: Multiple consecutive
RUN
instructions. Consider consolidation.
[warning] 22-22: Pin versions in apk add. Instead of
apk add <package>
useapk add <package>=<version>
[info] 23-23: Multiple consecutive
RUN
instructions. Consider consolidation.
[warning] 45-45: Pin versions in apk add. Instead of
apk add <package>
useapk add <package>=<version>
[warning] 59-59: Use arguments JSON notation for CMD and ENTRYPOINT arguments
Additional comments not posted (2)
packages/api/Dockerfile (2)
58-58
: AddedEXPOSE 3000
to make the container's port 3000 accessible.
Line range hint
7-7
: Consider consolidating consecutiveRUN
instructions to reduce layers and optimize the build.
[REFACTOR_SUGGESTion]- RUN apk add --no-cache libc6-compat - RUN apk update + RUN apk add --no-cache libc6-compat && apk updateAlso applies to: 23-23
@@ -54,6 +54,8 @@ WORKDIR /app/packages/api | |||
# # # # # # # # # # # # | |||
# DEV: Maintain the /app/packages/api folder as context (Breaking) | |||
# # # # # # # # # # # # | |||
|
|||
EXPOSE 3000 | |||
CMD node dist/src/main.js |
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.
Use JSON notation for CMD to ensure correct parsing.
- CMD node dist/src/main.js
+ CMD ["node", "dist/src/main.js"]
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
CMD node dist/src/main.js | |
CMD ["node", "dist/src/main.js"] |
Tools
Hadolint
[warning] 59-59: Use arguments JSON notation for CMD and ENTRYPOINT arguments
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: 0
Outside diff range and nitpick comments (1)
packages/api/src/main.ts (1)
Line range hint
5-5
: Import Node.js built-in modules using thenode:
protocol to ensure compatibility and clarity.- import * as fs from 'fs'; + import * as fs from 'node:fs';
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- packages/api/src/main.ts (1 hunks)
Additional context used
Biome
packages/api/src/main.ts
[error] 5-5: A Node.js builtin module should be imported with the node: protocol.
Additional comments not posted (1)
packages/api/src/main.ts (1)
32-32
: Ensure that removing the dynamic host configuration does not affect deployments where a specific host binding is required.
No description provided.