Baldinof / roadrunner-bundle

A RoadRunner worker integrated in your Symfony app
MIT License
270 stars 48 forks source link

Running multiple environments at once? #127

Closed DubbleClick closed 10 months ago

DubbleClick commented 1 year ago

This may not be possible, but I'd like to check what the recommended way to replicate this is moving from apache + fpm to roadrunner.

I currently have 4 vhosts in my apache config, one, two, three and four. Each points to the same /var/www/app/public directory with APP_ENV one|two|three|four. Since php-fpm boots the kernel with the current requests environment variables, all is well.

Now, is it possible to boot four workers for each of the four app environments with roadrunner and have it handle an incoming request to a specific host with its respective environment worker?

The only way I can currently see how to set it up is running four roadrunner instances on different ports, passing the respective APP_ENV at startup and using apache or nginx as a reverse proxy.

Actually, to complicate matters a little more, each of these four environments uses mercure and as far as I can see, a mercure support request for roadrunner was closed in favour of centrifugo.

Do I really have to setup four roadrunner servers, four mercure servers and apache or nginx to piece it all together?

DubbleClick commented 1 year ago

Actually this feature request was raised in #63 so I suppose it's not possible. Running a reverse proxy and one rr server per tenant is the best option?

iborysenko commented 10 months ago

Hi, using more than one RR config for your case is possible. In my project, we have two configs. one for HTTP workers, and another one for JOBS. So you can start it in one docker container using different ports.

DubbleClick commented 10 months ago

Closing, since I moved to Caddy/FrankenPHP and this doesn't appear to be possible or planned.