UniTrackApp / dashboard

📊 Attendance monitoring platform for universities with powerful data analytics and visualizations. Built with Next.js.
https://unitrack-dashboard.vercel.app
GNU General Public License v3.0
5 stars 1 forks source link

Setup `dev` and `prod` databases with Prisma & Railway #57

Open aryanprince opened 1 year ago

aryanprince commented 1 year ago

Thing is, now we only have 1 database that's used in production and during local development.

Ideally we would have a setup like this:

PS: Although we can run prisma migrate deploy locally, it's best to use prisma migrate dev on our local machine and instead use prisma migrate deploy only on our CI/CD pipeline.

You can read more about this on: https://www.prisma.io/docs/guides/deployment/deploy-database-changes-with-prisma-migrate

What I Want Us To Do

aryanprince commented 11 months ago

Made some progress with this issue, I set up a Docker Compose script so we can just run that to spin up a quick Postgres database for local development. This means we won't have to mess with our production data during development.

What do you think?

Script rn:

image

This creates a Postgres container we can connect to in our ENV file:

image image