git commit

Hi, I have my customer who is setting up the prod website with pictures and some info stored in sqlite. If I want to commit the changes made on the railway server how can I do it? Thanks,
19 Replies
Percy
Percy16mo ago
Project ID: a1aac6d6-3355-42f2-9a44-6e14775e121c
dalton57918
dalton5791816mo ago
a1aac6d6-3355-42f2-9a44-6e14775e121c
Brody
Brody16mo ago
was the sqlite database stored in a volume?
dalton57918
dalton5791816mo ago
no on the disk It's a strapi backend And it's stored in sqlite
Brody
Brody16mo ago
the containers storage is not persistent, you would need to use postgres in order to keep the data persistent across deployments
dalton57918
dalton5791816mo ago
I can't push and commit before new deployment?
Brody
Brody16mo ago
it would wipe the data in the sqlite database so tl;dr you can't get that sqlite database back from within a deployment on railway since its not stored in a volume going forward please use postgres as your database, you can find the railway template for strapi with postgres here https://railway.app/template/strapi
dalton57918
dalton5791816mo ago
Ok I created the image. I have done the export from my initial. Now I would like to run this command on the new image I deployed npm run strapi import -- -f export_20221213105643.tar.gz.enc How can I run it? Is there virtual console available?
Brody
Brody16mo ago
have you switched to postgres?
dalton57918
dalton5791816mo ago
yes I deployed the strapi image you proposed to me From my initial sqlite db I exported all the data Now I need to import them in the postgre version To do this I need to run this command on the postgre version: npm run strapi import -- -f export_20221213105643.tar.gz.enc
Brody
Brody16mo ago
then you will want to run that command through the railway cli locally with railway run see the railway cli docs here https://docs.railway.app/develop/cli
dalton57918
dalton5791816mo ago
ok thanks
Brody
Brody16mo ago
if you get stuck, feel free to ask!
dalton57918
dalton5791816mo ago
Re I linked my railway project But I need to run my command : railway run "npm run strapi import -- -f my.tar.gz.enc" In the strapi dir How can I access to it? do I need to upload the file on the server or not?
Brody
Brody16mo ago
you need to run that command locally in your strapi project folder this requires cloning the repo to your computer
dalton57918
dalton5791816mo ago
OK it's not working Are you sure it applies the command on the remote?
Brody
Brody16mo ago
it runs the command locally you can't run commands on the deployment, but this should do the same thing locally too what errors are you running into?
dalton57918
dalton5791816mo ago
I need to run the command remotly to import my data on the new server with postgre
Brody
Brody16mo ago
^
Want results from more Discord servers?
Add your server