P
Prisma•3w ago
Enze

Prisma with multi environments

Hello there, I'm trying to use Prisma for both development and production environment. I have two environment files: - .env.development - .env.production Locally, all I need is .env.development, so the production file is not relevant here. However, once I deploy it, there will be a .env.production file present which should be used, but Prisma - as the docs say- don't seem to allow that naming. Is there a way to stick to the name still? I don't want to rename it to just .env because 1) it's just better naming and 2) my whole app uses that, not just prisma. Any ideas? PS: I haven't tested deployment yet, I'm just making sure I plan ahead properly
3 Replies
Prisma AI Help
Prisma AI Help•3w ago
You're in no rush, so we'll let a dev step in. Enjoy your coffee, or drop into #ask-ai if you get antsy for a second opinion!
Nurul
Nurul•3w ago
Using multiple .env files. | Prisma Documentation
Learn how to set up a dedicated testing environment using multiple .env files.
GitHub
How to appropriately handle prod/dev environment variables · prisma...
I have a nextjs project set up using prisma in the backend. I largely followed the tutorial but am having difficulties setting the DATABASE_URL when trying to create a production build. I currently...
Enze
EnzeOP•3w ago
Thank you! Do you happen to know if it also works with cross-env? It seems like it does work, thank you! (:

Did you find this page helpful?