a month ago
Hi folks,
I have a Laravel + Inertia.js project with SSR working perfectly in my local environment (php artisan inertia:start-ssr
with a Node SSR server).
On Railway, I’ve followed the official Laravel deployment guide here: https://docs.railway.com/guides/laravel and set up the multi-service architecture (one service for PHP/Laravel, another for the database). Everything runs fine in SPA mode.
However, I’m not sure how to integrate the Inertia SSR server into this architecture:
Should the SSR server run as a separate Railway service, or be part of the Laravel app service?
How should I handle the SSR build step (
npm run build:ssr
) in Railway’s deploy process?What’s the recommended way to keep the SSR server running alongside the PHP service?
If anyone has successfully configured Inertia SSR on Railway, I’d love to see how you approached the service configuration and deployment scripts.
Thanks.
2 Replies
a month ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
a month ago
The solution involves running the SSR server as a separate Railway service and configuring the deployment process to include the SSR build step (npm run build:ssr
). The SSR server should be kept running alongside the PHP service, possibly by using Railway's multi-service architecture to manage separate services for the Laravel app and the SSR server.
Status changed to Awaiting User Response Railway • 28 days ago
Status changed to Solved parmstar • 28 days ago