Stu Mason
Stu Mason

Activity

StuMason/cleanconnect
TidyLinker.com
TypeScript
Pull Request Opened

PR #133 opened: build: enable Inertia SSR in production image

Summary

  • Switch frontend build to npm run build:ssr so the SSR bundle (bootstrap/ssr/ssr.mjs) is emitted
  • Copy the SSR bundle into the runtime image
  • Add a supervisor program that runs php artisan inertia:start-ssr, gated on bootstrap/cache/config.php existing so it doesn't race the entrypoint's config:cache

Without these, setting INERTIA_SSR_ENABLED=true was a silent no-op: Inertia tried to reach 127.0.0.1:13714, got ECONNREFUSED, and fell back to client-side rendering. Crawlers received an empty <div id="app"></div> — which is exactly what the recent Xanthos audit picked up ("word count of 1, text-to-HTML 0.00").

Approach mirrors what's already working in the progress repo.

Test plan

  • Coolify dev build succeeds
  • curl https://dev.tidylinker.com/ (as Googlebot UA) returns rendered HTML inside <div id="app">…</div>, including <h1> and meta description
  • No SSR-related errors in container logs (docker logs … | grep -i ssr)
  • Authenticated pages still render correctly client-side after hydration
  • If green: same deploy on production
+16
additions
-1
deletions
2
files changed