How to run commands on live service?
nahasco
HOBBYOP

2 years 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".

Closed

6 Replies

nahasco
HOBBYOP

2 years ago

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


2 years 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


2 years 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?


2 years ago

but that didn't seems to work either.

preview

MY_VAR=over_this_value_from_railway railway run 

2 years ago

db migrations are the correct way to do this



Welcome!

Sign in to your Railway account to join the conversation.

Loading...