Can somebody tell me how to setup prisma cloud wit...
# orm-help
s
Can somebody tell me how to setup prisma cloud with heroku to have different environments for dev and production?
t
@Shakle I think you would just have different demo instances on heroku. Name them appropriately, dev/staging/prod. And you would switch out which endpoint you're deploying to in your prisma.yml. You can use
.env
variables to switch which endpoint you're deploying to, so you don't have to keep committing the different endpoints. // prisma.yml
endpoint: ${env:PRISMA_ENDPOINT}
// package.json in "scripts"
Copy code
"deploy:prisma": "prisma deploy -e .env",
"deploy:prisma:local": "prisma deploy -e .env.local",
// .env
Copy code
# prisma.yml
PRISMA_ENDPOINT="<https://your-heroku-name-prod.herokuapp.com>"
// .env.local
Copy code
# prisma.yml
PRISMA_ENDPOINT="<http://localhost:4466>"