Github project update - Strapi data will be erased?

Hi, I have a Strapi project hosted on Railway. It is using a Postgres database and was deployed from a Github repository following this guide : https://dev.to/yinks/how-to-create-and-deploy-a-strapi-project-on-railway-3kja. On another Railway hosted Strapi project, I had the problem, so I prefer to ask you : if I update my project on Github (new commit), Railway project will be updated right (new build will be made)? Will the database be erased with this new build? I have to modify a simple file and I do not want to lose my database (Strapi data) that makes me a very long time to create. Many thanks for you help. Best regards. Guillaume
10 Replies
Percy
Percy•16mo ago
Project ID: N/A
GuillaumeDevloop
GuillaumeDevloop•16mo ago
N/A
root
root•16mo ago
Database plugins won't have their data erased on updates, just the service you're updating.
Brody
Brody•16mo ago
I have seem people's strapi data get erased because they where running strapi develop on railway
Adam
Adam•16mo ago
If the strapi database is in the same service as your app, it will be erased to avoid this, create a separate service for the db
GuillaumeDevloop
GuillaumeDevloop•16mo ago
Thanks a lot, how to verify this? How to be sure my database is separated from Strapi service? Sorry to ask, I'm quite new to Railway usage. And thanks for your time and help 🙂 For this project, by following tuto I have created a Postgres DB (service) in Railway but for another project (strapi too), DB was included in same project/service, so I'm a little bit confused. And when I click on my Postgres DB and I check tables, they seem empty (but I have added data via my strapi dashboard and this is working well)
Adam
Adam•16mo ago
sounds to me like you’re still adding to the strapi database. You’ll have to dump the strapi database then run the dump through your postgres database to create a copy of the data I don’t use databases too often so i’m not going to be much help here
Brody
Brody•16mo ago
you also answered it yourself, you just told us that you already know how to differentiate between a strapi service that has an internal database and one that has an external database
GuillaumeDevloop
GuillaumeDevloop•16mo ago
Thanks a lot, sounds to me that it's not using the Postgres DB too... But I have no idea how to check the data inside Strapi service... any clue ? Hi, I can see when I have two services in railway project (strapi + postgres) or only one (strapi). But I cannot figure out how to check where is data inside strapi service and why postgress db is empty (I do not understand why this tuto told me to create one if it's not used)
Brody
Brody•16mo ago
send your database.js file please
Want results from more Discord servers?
Add your server