For me it worked in abt 10 minutes all in. My steps:
-
from the railway dashboard choose New Project >> Deploy a template
-
Type “Strapi”, it is the template from Milo
-
under both sevices (Postgres and Strapi) choose “Configure” and choose “Save config”. I did not change anything, eventhough you could set a repo name for your github here.
-
click “Deploy” and wait (it took some minutes to build here)
After that note the project name, that railway assigns to your project, you need it in step 6.
Now go into your github repos and choose the newly created repo and clone it on your local machine and cd into it.
(for the following you need to have railway cli installed “npm i -g @railway/cli”)
-
log into railway by “railway login”
-
enter “railway link”, choose the project name from the railway dashboard and choose “Strapi” (not Postgresql)
-
run “npm install” (for some reason for me yarn did not work)
-
now run “railway run npm run develop” (yes, two times “run”)
Now you should be able to open strapi locally under 127.0.0.1:1337/admin and create an admin.
Changes you do locally will be reflected in your Postgresql on railway.
So e.g. create the admin locally.
Now if you go to your app from your railway dashboard you will see the app in production and under
/admin you can login with the admin you created locally.