Deploying Laravel Reverb

Hello, I am trying to figure out what the best approach for deploying Laravel Reverb on fly.io would be. I already have an existing Laravel app running on fly.io

At first, I tried using the same strategy that I used for SSR following this guide:

So I created a reverb process in my fly.toml

[processes]
// ...
app = ''
ssr = 'php /var/www/html/artisan inertia:start-ssr'
reverb = 'php /var/www/html/artisan reverb:start'

But I realized following the SSR approach doesn’t work here because SSR uses the internal fly.io URL to connect on the server side (ssr.process.<app>.internal:13714). For Reverb, I need my frontend clients to connect to the Reverb server so I need a public URL.

The other approach would be to create another fly app that hosts just Reverb? I’m not sure how to do it because I still want to use the same Laravel project and probably the same Dockerfile but deploy to a different app. I’m also not sure if this is the best approach.

1 Like

If anyone ends up here, my solution ended up being deploying a separate Soketi app instead of using Laravel Reverb. Soketi supports Pusher.js clients and therefore is comaptible with Laravel Echo, it’s also probably more performant than Reverb (but that’s just a hunch).

It’s also cheaper to run compared to Pusher.js.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.