How to correctly deploy prisma into production?
So Im a bit clueless here, am I supposed to run
prisma generate
in my Dockerfile? Im using prisma with nextjs dockerfile and doing:
with:
but im getting DATABASE_URL was not found, where could be the issue? or am i doing the whole thing wrong?3 Replies
Hello 👋
What variables have you defined in your .env.production file?
Are all these variables defined?
Could you try this
docker-compose.yml
?
Also, here is a reference of adding docker with Prisma in a testing guide that we wrote:
https://www.prisma.io/docs/orm/prisma-client/testing/integration-testing#add-docker-to-your-projectIntegration testing with Prisma | Prisma Documentation
Learn how to setup and run integration tests with Prisma and Docker
Okay I know where the issue is now, I have declared postinstall script as well, which at that time, the environment variable was not yet set from the arg, therefore failing to migrate, I have now fixed it and its working :)
I am glad to hear that! 🙂