How to run commands on live service?

nahascoHOBBY

a year ago

I would like to run a shell command on my django service thats online. Things like "python manage.py migrate" or "python manage.py custom_command".

0 Replies

nahascoHOBBY

a year ago

643c9962-5fa0-449c-82e0-67b30f66c552


a year ago

that is not possible, instead run these commands locally with railway run that runs the command on your computer, but makes the environment variables from your railway service available locally


4 months ago

As I am using private link in production to connect with db.

I am trying to run a local file (to inject some data into the database). That will not possible work while running the command locally.

Is there any workaround for this?


4 months ago

but that didn't seems to work either.

preview

MY_VAR=over_this_value_from_railway railway run 

4 months ago

db migrations are the correct way to do this