ssh into db private using token
cs
PROOP

22 days ago

hi,

i set mysql DB with only private networking as i don't want to expose db to public.

but i want to run liquibase to do db changes and i can do that manually by logging into db server using ssh, but how can i do it non-interactively? does railway ssh supports login using token?

thanks.

Solved$20 Bounty

3 Replies

Railway
BOT

22 days ago

The railway ssh command supports running a single command non-interactively via railway ssh -- , and you can authenticate it in CI/CD by setting the RAILWAY_TOKEN environment variable (a project token). That said, for running Liquibase migrations, the recommended approach is to use a pre-deploy command in your service settings, which executes within the private network with access to all your service's environment variables, and runs automatically before each deployment. Note that railway run executes commands locally, so it would not have access to the private network.


Status changed to Awaiting User Response Railway 22 days ago


cs
PROOP

22 days ago

thanks, if I use liquibase command as pre-deploy then does it mean liquibase should be installed ahead on the docker image? or railway able to run the liquibase command on db without my image having liquibase ?


Status changed to Awaiting Railway Response Railway 22 days ago


Railway
BOT

22 days ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open Railway 22 days ago


cs
PROOP

18 days ago

never mind, I need to have seperate liquibase migration service which will run against the db and cannot use pre-delpoy command as db won't be ready with that option.


Status changed to Solved Railway 18 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...