Repository navigation
fix(docker): pass --config to prisma migrate deploy in bot CMD - #463
Conversation
The bot container crash-loops because 'npx prisma migrate deploy' cannot find the datasource URL without the --config flag. The root package.json scripts all pass '--config prisma/prisma.config.ts' but the Dockerfile CMD was missing it, causing prisma to fail with: 'The datasource.url property is required in your Prisma config file' This breaks /version, /play, and all bot commands since the process never reaches node packages/bot/dist/index.js.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🧰 Additional context used🧠 Learnings (8)📓 Common learnings📚 Learning: 2026-03-09T20:21:15.595ZApplied to files:
📚 Learning: 2026-03-15T21:57:49.951ZApplied to files:
📚 Learning: 2026-03-09T20:21:46.291ZApplied to files:
📚 Learning: 2026-03-15T21:57:49.951ZApplied to files:
📚 Learning: 2026-03-09T20:21:08.612ZApplied to files:
📚 Learning: 2026-03-09T20:21:31.459ZApplied to files:
📚 Learning: 2026-03-09T20:21:08.612ZApplied to files:
🔇 Additional comments (1)
📝 WalkthroughWalkthroughThe Dockerfile's Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
The bot CMD was missing --config prisma/prisma.config.ts, causing Prisma 7.x to fail finding the datasource URL. Matches the working pattern in package.json:db:deploy.



Problem
The bot container is crash-looping in production —
/version,/play, and all bot commands are broken.This repeats infinitely because the bot CMD runs
prisma migrate deploybefore starting the Node process, and Prisma can't find the database URL.Root cause
The Dockerfile bot CMD was:
But
prisma migrate deployin Prisma 7.x requires--config prisma/prisma.config.tsto resolve the datasource URL (which readsDATABASE_URLfrom the environment). Without it, Prisma defaults to looking for aurlfield directly inschema.prisma— which doesn't have one (it's in the config file).The root
package.jsonalready passes--config prisma/prisma.config.tscorrectly:The Dockerfile CMD was the only place missing it.
Evidence
lucky-botcontainer status:Restarting (1) 53 seconds agonode packages/bot/dist/index.js/api/healthreturns ok), bot is downe7f91ab4is deployed (lyrics PR), images are correct but bot can't startFix
Verification
package.json:db:deploylucky-botcontainer showsUpinstead ofRestartingSummary by CodeRabbit