What's the best approach for this?

I have a Discord bot that uses the quick.db npm package to store data. It currently reads and writes from a database.sqlite file which stores all the data. When I upload my project to Railway, the database works fine - stores data, reads it, perfectly fine. However, when I any new changes to my project, the database gets overwritten by a new one. This was mostly expected for a problem like this, so I though I'd ask to see what's the best approach for this. a. Is there a way to have Railway push the database back to the GitHub repository, so when I pull those changes on my local machine, edit, and push it back again, everything will be synced? b. Or, the most realistic way of saying this, could I use a MySQL service on Railway? I'm more leaning towards the MySQL option, but I'm not sure how much it would cost per month, or what that would look like. If anyone could give me some pointers, that'd be greatly appreciated!
15 Replies
Percy
Percy2y ago
Project ID: N/A
proudparrot2
proudparrot2OP2y ago
N/A
Percy
Percy2y ago
b. Or, the most realistic way of saying this, could I use a MySQL service on Railway?
⚠️ experimental feature
jackson
jackson2y ago
option b is the best by far
proudparrot2
proudparrot2OP2y ago
Okay What would be the pricing for one of those?
jackson
jackson2y ago
only thing is that mysql is kinda expensive to run compared to something like postgres it hogs memory for some reason
proudparrot2
proudparrot2OP2y ago
Okay
jackson
jackson2y ago
dont know off the top of my head but if you can set up postgres it will be cheaper
proudparrot2
proudparrot2OP2y ago
I'm not sure if quick.db will support that, but I'll look into it Do you know how much on average that would cost if I ran it for a full month?
jackson
jackson2y ago
postgres would probably run you like $5-6, i'd estimate mysql to be closer to $8-10
proudparrot2
proudparrot2OP2y ago
Alright
jackson
jackson2y ago
naturally w/ usage (lots of read/write) it may vary
proudparrot2
proudparrot2OP2y ago
How exactly is it priced? Per call/usage or just straight I'd imagine usage
jackson
jackson2y ago
usage based on ram/cpu
proudparrot2
proudparrot2OP2y ago
ok thanks
Want results from more Discord servers?
Add your server