Skip to content

SSR features #415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions resources/js/Pages/server-side-rendering.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,22 @@ export default function () {
php artisan inertia:stop-ssr
`}
/>
<H2>Laravel Forge</H2>
<P>
You may use the <Code>inertia:check-ssr</Code> Artisan command to verify that the SSR server is running.{' '}
This can be helpful after deployment and works well as a Docker health check to ensure the server is responding as expected.
</P>
<CodeBlock
language="bash"
children={dedent`
php artisan inertia:check-ssr
`}
/>
<P>
By default, a check is performed to ensure the server-side bundle exists before dispatching a request to the SSR server.{' '}
In some cases, such as when your app runs on multiple servers or is containerized, the web server may not have access to the SSR bundle.{' '}
To disable this check, you may set the <Code>inertia.ssr.ensure_bundle_exists</Code> configuration value to <Code>false</Code>.
</P>
<H3>Laravel Forge</H3>
<P>
To run the SSR server on Forge, you should create a new daemon that runs{' '}
<Code>php artisan inertia:start-ssr</Code> from the root of your app. Or, you may utilize the built-in Inertia
Expand All @@ -536,7 +551,7 @@ export default function () {
<Code>php artisan inertia:stop-ssr</Code> command. This will stop the existing SSR server, forcing a new one to
be started by your process monitor.
</P>
<H2>Heroku</H2>
<H3>Heroku</H3>
<P>
To run the SSR server on Heroku, update the <Code>web</Code> configuration in your <Code>Procfile</Code> to run
the SSR server before starting your web server.
Expand Down