How to use Railway CLI to run service locally?
quarkhadron
HOBBYOP

a month ago

I'm trying to run Strapi Locally, however, I didn't eject, I tried railway link and railway run yarn run dev but it doesn't seem to run strapi locally

https://github.com/railwayapp-templates/strapi

14 Replies

Are there any errors? Any signs telling you it's not running locally?


Keep in mind that for railway link, you need to have a project in your account linked to the current directory to be able to pull variables from it.


quarkhadron
HOBBYOP

a month ago

Nope, it just spin up my Next.js web app


quarkhadron
HOBBYOP

a month ago

could you explain?


quarkhadron
HOBBYOP

a month ago

This is currently Strapi settings

image.png

Attachments


Well, yes. railway run pulls environment variables from the specified service and runs the command locally. (Read railway help and railway run -h)


If you want to run Strapi locally, you'd need to clone the repository to your machine, configure the required variables and dependencies, then railway link, then railway run to run the project locally.


quarkhadron
HOBBYOP

a month ago

So I need to eject upstream repository? What if upstream repository has updates?


I did not say eject.

Running Strapi locally has nothing to do with the upstream service in Railway. The only thing railway run does is give you access to the variables inside your Railway service.


quarkhadron
HOBBYOP

a month ago

Hmm alright, i'll try


quarkhadron
HOBBYOP

a month ago


quarkhadron
HOBBYOP

a month ago

image.png

Attachments


Did you follow the instructions in README.md?


quarkhadron
HOBBYOP

a month ago

yup


Welcome!

Sign in to your Railway account to join the conversation.

Loading...