Anyone know of a tutorial which explains how to se...
# orm-help
g
Anyone know of a tutorial which explains how to setup dev environments with Prisma? I'm wondering how to point prisma to different PSQL databases, one for development and one for production for example
a
you could use a .env file to load environment variables and use them in your prisma.yml like
endpoint: ${env:PRISMA_URL}
each of the endpoints could run off from a different docker-compose config
Also keep in mind that you can stage on a single database by changing the service/stage of your endpoint
👍 1
PRISMA_URL="<http://localhost:4466/data/development>"
will for instance deploy your data service in the environment development, you can use the endpoint
PRISMA_URL="<http://localhost:4466/data/staging>"
to then deploy the datamodel to the staging environment
within your psql databse it will create different schemas for each service+stage combination
you can run prisma deploy with an environment variable file as well
prisma deploy --env-file .env.prod
g
Thank you for the expertise @Alex
a
hope it helps