How to deploy to a self-hosted server?
At the moment I'm hosting my website on github pages, but I've kinda outgrown github pages now that my site needs a database.
I have a spare machine lying around, so I'm trying to host my website off of it instead. Ideally I want to add some kind of a CI to automatically keep my site up-to-date whenever I push to github (and I think self hosted actions runners are the way to do this?) but I don't know how this would tie into prisma at all?
I'm also super unsure if my project is set up right because I've gitignore'd the everything in the prisma folder except the schema
I've got near-zero experience doing anything like this so please be patient with me!!
2 Replies
Ok, I kinda got something working but it's very jank and relies on me setting an environment variable in
~/.bashrc
Hello 👋
Have you seen this guide?
https://www.prisma.io/docs/orm/prisma-client/deployment/deploy-database-changes-with-prisma-migrate
We also have a section on deploying database changes via GitHub Actions:
https://www.prisma.io/docs/orm/prisma-client/deployment/deploy-database-changes-with-prisma-migrate#deploying-database-changes-using-github-actions
Deploying database changes with Prisma Migrate | Prisma Documentation
Learn how to deploy database changes with Prisma Migrate.