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
Project ID:
a1aac6d6-3355-42f2-9a44-6e14775e121c
a1aac6d6-3355-42f2-9a44-6e14775e121c
was the sqlite database stored in a volume?
no on the disk
It's a strapi backend
And it's stored in sqlite
the containers storage is not persistent, you would need to use postgres in order to keep the data persistent across deployments
I can't push and commit before new deployment?
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
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?
have you switched to postgres?
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
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/cliok thanks
if you get stuck, feel free to ask!
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?
you need to run that command locally in your strapi project folder
this requires cloning the repo to your computer
OK it's not working
Are you sure it applies the command on the remote?
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?
I need to run the command remotly to import my data on the new server with postgre
^