Correct way to setup prisma + docker
(I am new to prisma this is my first project using it) Hi I am currently trying to dockerise one of my typescript apps (discord bot) which is using prisma with sqlite database. I am in the middle of writing the dockerfile
This is it so far:
My question is what is the proper way to set up migrations or something so that when I push a new version of the
scheme.prisma
the database automatically gets updated without wiping current data. The sqlite database is persistent across the container builds.4 Replies
I use a boot.sh script
and then this in the docker file
CMD [ "./boot.sh" ]
so
npx prisma migrate deploy
is the command I am looking for?
What about the first deployment?Like most I develop locally, before shoving out into staging/prod.
I use
npx prisma migrate dev --name migration_name
to generate my migration files after a schema change, the first line applies those migrations on remotethen my migrations folder looks like this