laravel / pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.
https://pulse.laravel.com
MIT License
1.48k stars 173 forks source link

Add supervisor configuration #374

Closed clementmas closed 6 months ago

clementmas commented 6 months ago

It wasn't initially clear to me that I had to run a background process to get the full Pulse experience with the server cards. I got spoiled and used to having everything work on Laravel with a simple composer install command.

Would you accept a PR to the documentation to add more information about how to configure Supervisor? It would reuse a lot of information from the Queues documentation and include the plug for Laravel Forge.

It would be especially useful to add the config itself. This is the one I've been using:

[program:pulse-worker]
process_name=%(program_name)s_%(process_num)02d
directory=/home/ubuntu/app.com
command=php artisan pulse:check
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
user=www-data
numprocs=1
redirect_stderr=true
stdout_logfile=/home/ubuntu/app.com/pulse-worker.log
stdout_logfile_maxbytes=5MB
stdout_logfile_backups=3

I mostly re-used the queue config. Let me know if it can be improved for Pulse's usage.

Even if it doesn't get included in the docs, new users will at least be able to find this thread to get more information.

driesvints commented 6 months ago

Yeah I think this can be a useful addition. I guess this will have to go here: https://laravel.com/docs/11.x/pulse#capturing-entries. Feel free to attempt a PR to the docs, thanks!