-
Notifications
You must be signed in to change notification settings - Fork 226
[comp] Production Deploy #1934
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
[comp] Production Deploy #1934
Conversation
* feat(api): add multi-stage Docker build configuration and docker-compose * chore(api): add comment for local testing in docker-compose file --------- Co-authored-by: Tofik Hasanov <annexcies@gmail.com> Co-authored-by: Mariano Fuentes <marfuen98@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
PR SummaryIntroduces a multi-stage Docker build for the API with CI/CD buildspec and local docker-compose, and adds the esbuild dependency.
Written by Cursor Bugbot for commit e59dc63. This will update automatically on new commits. Configure here. |
|
|
Graphite Automations"Auto-assign PRs to Author" took an action on this PR • (12/16/25)1 reviewer was added to this PR based on Mariano Fuentes's automation. |
Co-authored-by: Tofik Hasanov <annexcies@gmail.com>
* chore(api): simplify docker build command in buildspec * chore(api): update Dockerfile to use bunx for NestJS build --------- Co-authored-by: Tofik Hasanov <annexcies@gmail.com> Co-authored-by: Mariano Fuentes <marfuen98@gmail.com>
| COPY --from=builder /app/node_modules ./node_modules | ||
|
|
||
| # Set production environment | ||
| ENV NODE_ENV=production | ||
| ENV PORT=3333 | ||
|
|
||
| # Install Prisma CLI and regenerate client in production stage | ||
| RUN npm install -g prisma@6.13.0 && \ | ||
| prisma generate --schema=./prisma/schema.prisma |
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.
Critical: Runtime incompatibility between Bun and Node.js dependencies
The node_modules directory is installed with Bun (stage 1, line 21) but copied to a Node.js runtime (stage 3, line 80). While Prisma is regenerated (lines 87-88), other packages with native bindings may fail at runtime because they were compiled for Bun's runtime, not Node.js.
Impact: Production crashes when loading native modules (e.g., bcrypt, sharp, any C++ addons)
Fix: Either use the same runtime in all stages, or reinstall production dependencies in the Node.js stage:
# Option 1: Use Node.js throughout
FROM node:20-alpine AS deps
RUN npm install
# Option 2: Reinstall in production stage (after line 71)
RUN npm ci --omit=dev
RUN npm install -g prisma@6.13.0 && prisma generate| COPY --from=builder /app/node_modules ./node_modules | |
| # Set production environment | |
| ENV NODE_ENV=production | |
| ENV PORT=3333 | |
| # Install Prisma CLI and regenerate client in production stage | |
| RUN npm install -g prisma@6.13.0 && \ | |
| prisma generate --schema=./prisma/schema.prisma | |
| COPY package*.json ./ | |
| # Set production environment | |
| ENV NODE_ENV=production | |
| ENV PORT=3333 | |
| # Install production dependencies and Prisma CLI | |
| RUN npm ci --omit=dev | |
| RUN npm install -g prisma@6.13.0 && \ | |
| prisma generate --schema=./prisma/schema.prisma | |
Spotted by Graphite Agent
Is this helpful? React 👍 or 👎 to let us know.
|
🎉 This PR is included in version 1.72.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This is an automated pull request to release the candidate branch into production, which will trigger a deployment.
It was created by the [Production PR] action.