-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: added Dockerfile for containerizing Papermark #1895
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
@atharvf14t is attempting to deploy a commit to the mftsio Team on Vercel. A member of the Team first needs to authorize it. |
All contributors have signed the CLA ✍️ ✅ |
WalkthroughAdds Docker-related configuration: a new .dockerignore with common exclusions and a multi-stage Node.js 18 Alpine Dockerfile that installs dependencies, builds the app, runs Prisma generate, prepares production artifacts, exposes port 3000, and starts with Prisma migrate deploy followed by npm start. Changes
Pre-merge checks✅ Passed checks (3 passed)
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. Comment |
I have read the CLA Document and I hereby sign the CLA |
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
🧹 Nitpick comments (1)
.dockerignore (1)
1-8
: Consider ignoring build artifacts too.Add
.next/
,out/
, and similar build outputs to shrink the build context and avoid stale assets catching the Docker cache.
RUN npx prisma generate | ||
|
||
RUN npm run build |
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.
Install openssl in the builder stage.
npx prisma generate
runs in this stage, but this layer never installs openssl
, so the Prisma engine fails with libssl.so
missing on Alpine. Install it (and keep it cached) before calling prisma generate
.
FROM node:18-alpine AS builder
WORKDIR /app
+RUN apk add --no-cache openssl
+
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN npx prisma generate
🤖 Prompt for AI Agents
In Dockerfile around lines 15 to 17, the builder stage runs "npx prisma
generate" but never installs OpenSSL, causing Prisma's engine to fail with a
missing libssl.so; add an installation step for OpenSSL in the builder stage
before running "npx prisma generate" (for Alpine: RUN apk add --no-cache
openssl) and place it in an earlier layer (before npm install / prisma generate)
so the package is cached between builds.
Summary
Added a Dockerfile to enable containerized deployment for Papermark.
Details
prisma generate
andnpm run build
prisma migrate deploy
on container startTesting
Summary by CodeRabbit