This library provides an implementation to run mezzio via spiral/roadrunner
.
Run the following to install this library:
$ composer require boesing/mezzio-httphandlerrunner-roadrunner
server:
command: "php -dopcache.enable_cli=1 -dopcache.validate_timestamps=0 vendor/bin/laminas roadrunner:run"
http:
address: "localhost:8080"
pool:
num_workers: 8
logs:
mode: production
channels:
http:
level: info # Log all http requests, set to info to disable
server:
level: debug # Everything written to worker stderr is logged
A list of available configuration parameters can be found in the spiral/roadrunner-binary
repository on github.
To be able to run roadrunner, you need to fetch the roadrunner binary. Use the following command to do so for your environment:
vendor/bin/rr get-binary
NOTE: By doing so, a rr
binary will be fetched to your current working directory. That binary only works for your current environment. So when you execute that command on MacOS, you will receive a binary prepared to run on MacOS and which is not compatible with Ubuntu for example.
To run your project, simply execute the binary fetched in the Retrieve roadrunner binary installation step:
./rr serve
This should ramp up the amount of workers configured in the Creating roadrunner configuration installation step and listens to the configured port.