-
Notifications
You must be signed in to change notification settings - Fork 24
added dockerfile #7
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
base: main
Are you sure you want to change the base?
Conversation
WalkthroughA Dockerfile was added to containerize the application using the Bun runtime, including build and run steps. The package.json was updated with new Docker-related scripts, dependency upgrades, and the addition of a new development tool. No code-level exports or public entity declarations were changed. Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant Docker
participant Bun Runtime
participant App
Developer->>Docker: Build image (docker:build)
Docker->>Bun Runtime: Install dependencies (bun install)
Docker->>Bun Runtime: Build app (bun run build)
Developer->>Docker: Run container (docker:run)
Docker->>Bun Runtime: Start app (bun run start:http)
Bun Runtime->>App: Serve on PORT (default 3000)
Poem
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: 0
🧹 Nitpick comments (3)
Dockerfile (2)
2-12
: Use a multi-stage build to optimize image size.Splitting into a
builder
andrunner
stage separates build-time dependencies from your production image and reduces final footprint:# Stage 1: install deps & build FROM oven/bun:1.2-alpine AS builder WORKDIR /app COPY package.json bun.lock ./ RUN bun install COPY . . RUN bun run build # Stage 2: production runtime FROM oven/bun:1.2-alpine AS runner WORKDIR /app COPY --from=builder /app/build /app/build COPY package.json bun.lock ./ RUN bun install --production ARG PORT=3000 ENV PORT=${PORT} EXPOSE ${PORT} CMD ["bun", "run", "start:http"]This pattern will speed up rebuilds and shrink the final image.
1-20
: Add a.dockerignore
to speed up builds.Exclude things like
node_modules
,.git
and local config files to keep your context light. For example:node_modules .git .env npm-debug.log .DS_Store build
This prevents re-sending large or irrelevant files on each build.
package.json (1)
34-37
: Allow overriding the containerPORT
at build and run time.Currently the Docker scripts are hardcoded to 3000. To respect the
ARG PORT
in your Dockerfile and let consumers switch ports more easily, update them as follows:- "docker:build": "docker build -t typescript-mcp-server-template .", - "docker:run": "docker run --name typescript-mcp-server-template -p 3000:3000 --env-file .env typescript-mcp-server-template", + "docker:build": "docker build --build-arg PORT=${PORT:-3000} -t typescript-mcp-server-template .", + "docker:run": "docker run --name typescript-mcp-server-template -p ${PORT:-3000}:${PORT:-3000} --env-file .env --env PORT=${PORT:-3000} typescript-mcp-server-template", "docker:stop": "docker stop typescript-mcp-server-template"
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
Dockerfile
(1 hunks)package.json
(2 hunks)
🔇 Additional comments (4)
Dockerfile (1)
14-18
: Verify your app honors thePORT
build‐arg and env var.You expose
${PORT}
in the Dockerfile, but ensurebun run start:http
readsprocess.env.PORT
(or equivalent) so the port arg actually takes effect at runtime.package.json (3)
65-68
: DevDependencies additions look good.
Adding@biomejs/biome
,@types/cors
and@types/node
aligns with the Docker build and TS usage.
72-74
: PeerDependencies additions look good.
@valibot/to-json-schema
,effect
, andtypescript
are correctly specified for consumers.
78-79
: Dependencies additions look good.
Includingfastmcp
andzod
matches the project’s runtime requirements.
run bun update as well,
feel free to change the ports if you want to stay on 3001
Summary by CodeRabbit
New Features
Dependency Updates
Chores