Skip to content

Slim down the Docker image - #28

Open
michaelherold wants to merge 1 commit into
thecodacus:mainfrom
michaelherold:slim-down-docker-image
Open

Slim down the Docker image#28
michaelherold wants to merge 1 commit into
thecodacus:mainfrom
michaelherold:slim-down-docker-image

Conversation

@michaelherold

@michaelherold michaelherold commented Aug 29, 2026

Copy link
Copy Markdown

This change uses pnpm's deploy-to-production filter to remove all of the files that are unnecessary for deployment. This saves a few hundred megabytes in size for the resulting Docker image.

Summary by CodeRabbit

  • Chores
    • Improved Docker build exclusions to reduce unnecessary build context.
    • Updated the production container setup for a smaller, streamlined deployment.
    • Production deployments now run with optimized settings and start from the generated server bundle.

This change uses pnpm's deploy-to-production filter to remove all of the
files that are unnecessary for deployment. This saves a few hundred
megabytes in size for the resulting Docker image.
@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a72e6f3e-a322-43e3-9ae7-33042cdb4271

📥 Commits

Reviewing files that changed from the base of the PR and between 0b20d7b and a56dfeb.

📒 Files selected for processing (2)
  • .dockerignore
  • Dockerfile

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The Docker configuration now excludes generated files from the build context, creates a deployable server bundle, and runs that bundle with web assets in a separate production runtime image.

Changes

Container deployment

Layer / File(s) Summary
Build and deployment preparation
.dockerignore, Dockerfile
The build context excludes repository metadata, dependencies, generated files, and build artifacts. The build stage runs pnpm -r build and deploys the server package to /deploy/server.
Production runtime image
Dockerfile
A separate node:22-alpine runtime stage copies the deployed server and web assets, sets NODE_ENV=production, and starts server/dist/index.js.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to a56df

The Docker build now produces a slimmer production image with no actionable merge-blocking risk remaining after normal checks and review.

Suggested reviewers: thecodacus

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: reducing the Docker image size through a slimmer production deployment layout.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant