Hi Guys . Could you tell me how do you manage seed...
# orm-help
j
Hi Guys . Could you tell me how do you manage seeding data and automatic backups with Prisma on production, please. Thank you !
👀 1
l
https://www.prisma.io/docs/prisma-cli-and-configuration/cli-command-reference/prisma-seed-xcv8/ Combined with regular database backups, and the occasional `prisma import`/`prisma export`
j
Thank you @luhagel for you answer,but what I was searching was seeding and automatic back on production server
l
The seed script can be run on a staging/prod server by supplying the relevant environment variables
And backing up the database itself depends on your database hosting provider
j
We have a VPS server that we will have to manage by ourselves 😅 and we use postgres.
is it better to backup with Prisma or directory with Postgres ?
l
Just make sure to move/copy them to a secure spot afterwards, so your backups aren't lost in case of a serious crash
Prisma ex/import is pretty nice for moving data, i.e. exporting your live data and importing it into a test environment
j
do you use a ci/cd pipeline for deploying a new release on production ?
Thank you so much for the information @luhagel 🙂
l
CI/CD for the actual server and client code,
prisma1 deploy
timed manually via the cli though
j
sorry I did not understand?
prisma deploy
is just creating the databases with the datamodel ? what about updating a container in production ...
l
prisma deploy
also migrates your datamodel over when there are differences between your deployed datamodel and your current one *and database
j
Yes but does not update the container
l
By updating the contianer you mean the prisma version?
j
yes
because I'm currently useing : prismagraphql/prisma:1.34
l
That won't change very much up until the launch of prisma 2
Only smaller security and bug fixes from what I can tell
j
I saw that there was a tool called lift and will be only available with the version 2 right ?
l
Exactly
j
and that seemed a very nice tool
l
If you have chosen the docker-compose route for example, upgrading the prisma container can be achieved by updating the version in the docker-commpose yml and restarting the service
j
ok. and do you have any idea about when will the Prisma 2 will be launched?
just made a quick search and did not find that information
I guess it's around the beginning of next year
l
Yeah, I wouldn't bet on this year
j
OK 😉 . Thank you so much for your time Sir !
l
No worries, have an awesome day!
j
Same to you Sir !