Octane / High-perf mode
In v1.3.0, we integrated DocKing with Laravel Octane - a high PHP performance runner.
Requirement
Usage
To run DocKing in Octane mode, you need to run this command:
php artisan octane:start
If you haven't installed RoadRunner, Laravel will ask your permission to automatically download the latest binary inside the root project folder, then run.
Production
To keep the command running for production usage, there are multiple ways to do so. We suggest using supervisor
to manage so that we can keep 2 things under 1 basket: queue & octane.
Basic configuration:
[program:docking-octane]
command=php /var/www/html/artisan octane:start --max-requests=500
autostart=true
autorestart=true
stderr_logfile=/var/log/supervisor/%(program_name)s_stderr.log
stdout_logfile_maxbytes=10MB
stdout_logfile=/var/log/supervisor/%(program_name)s_stdout.log
stderr_logfile_maxbytes=10MB
process_name=%(program_name)s_%(process_num)02d
And then just hit these commands and you are good to go:
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start docking-octane:*
Also it is recommended to use nginx
as the reverse proxy
to serve the application, check out this for the sample nginx.conf
virtualhost file:
https://laravel.com/docs/10.x/octane#serving-your-application-via-nginx
Last updated