Railway is a cloud platform based on Heroku that makes it easy to deploy you app on the cloud. You can provision infrastructure, develop with the i...
For further actions, you may consider blocking this person and/or reporting abuse
Hey Yinka, thanks for your tutorial!
I'm encountering a problem when I run the production build with:
ENV_PATH=./.env.production NODE_ENV=production yarn start
Strapi tells meβ¦
Do you have a solution? Thanks again!
When you change the the host from 0.0.0.0 to 127.0.0.1, you need to rebuild your strapi app again, then do npm start.
So basically:
npm run build
ENV_PATH=./.env.production NODE_ENV=production npm run start
This was perfect for what I was looking for. Thanks for sharing.
Now i have connected my strapi app to the database and my data is persisting in between builds...except for images. Guess we need to use cloudinary for that.
hey, how do you persist data between local development and production on Railway? can you please explain?
hi Mario,
Well once I setup the production build of Strapi I use that to build out the frontend. I am not using the same data on production and my local instance of Strapi.
Thanks a lot for this! I've had trouble getting my backend up and running on railway. I still have problems though. Eventhough the build is successful it gives me this in the logs:
Create your first administrator π» by going to the administration panel at:
βββββββββββββββββββββββββββββ
β 0.0.0.0:1337/admin β
βββββββββββββββββββββββββββββ
That page can't be reached. I don't see an adress for a global page either?
Got any clue on what im doing wrong here?
running ENV_PATH=./.env.production NODE_ENV=production yarn start
results in
'ENV_PATH' is not recognized as an internal or external command,
operable program or batch file.
any idea what might wrong ?
Very helpful -- not a lot of documentation on this out there. Thanks!
I followed all the steps and deployment was successful, I just dont get a Service domain. It only shows 0.0.0.0:1337. Any help would be appreciated
Click on
Settings
and look forDomains
. You'll be able to get a url there. I hope this helps!Thank you @yinks!
Another article about connecting tha backend service to a frontend service would be great. I am struggling to make requests from my frontend project to the backend.
I'd keep this on my todo. Thank you for the feedback
after pushing to production, all my prev content disappears. Any one know why it happened?
I am struggling deploying the project since I have the backend in the root directory and the Vue frontend in /frontend directory. Any clues about how to deploy this?
I believe the deployment should work all right, as the build tool will ignore the
frontend
directory.