How to setup deployed DB with users #194
-
I thought I'd learn about modern web development by jumping in and playing with the Epic Stack. I've got my project created and deployed on Fly, but I realize I'm not sure what the best way to create an initial database user is when using SQLite on a Fly volume. Is this something where we just ssh into the database-cli on fly and create the user and admin role via sql commands or are there other ways to go about doing this? What's best practices? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
I'm planning on documenting how to best seed the production database in the future. Right now ssh-ing into the box is best, but not very nice. |
Beta Was this translation helpful? Give feedback.
-
Total newcomer, to deploying to fly.io with sqlite & prisma, here: Would you guys please have any steps or link to some docs on how to get the local db file (already filled with data) to the deployed production app? I can't seem to get around any commands that would migrate the file and not just seed the base seed.ts. I've tried everything possible around connecting to the fly app's ssh console, (database-cli), etc.. |
Beta Was this translation helpful? Give feedback.
-
I still need to bring this back into the Epic Stack docs, but here's the recommendation I'm teaching in a workshop on Thursday: https://epicweb-dev-data-modeling.fly.dev/04 |
Beta Was this translation helpful? Give feedback.
-
I've added docs: https://github.com/epicweb-dev/epic-stack/blob/main/docs/deployment.md#seeding-production |
Beta Was this translation helpful? Give feedback.
I'm planning on documenting how to best seed the production database in the future. Right now ssh-ing into the box is best, but not very nice.