#git commit

39 messages · Page 1 of 1 (latest)

reef shuttle
#

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,

muted plinthBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

visual yarrowBOT
#

Project ID: a1aac6d6-3355-42f2-9a44-6e14775e121c

reef shuttle
#

a1aac6d6-3355-42f2-9a44-6e14775e121c

agile jay
#

was the sqlite database stored in a volume?

reef shuttle
#

no on the disk

#

It's a strapi backend

#

And it's stored in sqlite

agile jay
#

the containers storage is not persistent, you would need to use postgres in order to keep the data persistent across deployments

reef shuttle
#

I can't push and commit before new deployment?

agile jay
#

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

reef shuttle
#

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?

agile jay
#

have you switched to postgres?

reef shuttle
#

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

agile jay
reef shuttle
#

ok thanks

agile jay
#

if you get stuck, feel free to ask!

reef shuttle
#

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?

agile jay
#

you need to run that command locally in your strapi project folder

#

this requires cloning the repo to your computer

reef shuttle
#

OK it's not working

#

Are you sure it applies the command on the remote?

agile jay
#

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?

reef shuttle
#

I need to run the command remotly to import my data on the new server with postgre