What is the best practice to deploy migrations to production on AWS RDS?

Hey! So I am using Prisma ORM and I was wondering what are the best practices regarding Prisma to deploy database migrations to production when using AWS RDS within a private subnet. There are some possible solutions but they all feel quite engineered so I was wonder if there was a straightforward best approach that you would recommend. Thanks!
4 Replies
SmashingQuasar
SmashingQuasarOP2mo ago
Does anyone have any idea about this?
Yetzederixx
Yetzederixx2mo ago
I use npx prisma migrate dev --name something developing locally, then I use a boot.sh script which runs on launching the new container.
#! /bin/bash

npx prisma migrate deploy
npx prisma generate --sql
npm start
#! /bin/bash

npx prisma migrate deploy
npx prisma generate --sql
npm start
RaphaelEtim
RaphaelEtim2mo ago
Hi @Yetzederixx Please take a look at this documentation for deploying to Production. This other doc might also interest you.
Deploy migrations from a local environment | Prisma Documentation
Learn how to deploy Node.js and TypeScript applications that are using Prisma Client locally.
Deploy your application using Prisma ORM to AWS Lambda | Prisma Doc...
Learn how to deploy your Prisma ORM-backed applications to AWS Lambda with AWS SAM, Serverless Framework, or SST
Yetzederixx
Yetzederixx2mo ago
yeah my db url's are injected into the docker container at build time
Want results from more Discord servers?
Add your server