how-to-run-php-daemon-supervisor 🢃1

To run a PHP daemon worker using Supervisord🡭 as process controller you can create a /etc/supervisor/conf.d/custom-daemon.conf and add the following content:

[program:custom-daemon]
process_name=%(program_name)s
directort=/var/www/html/custom/directory
command=php CustomDaemon.php
autostart=true
autorestart=true
user=daemon
redirect_stderr=true
stdout_logfile=/var/www/html/logs/supervisord.log

Then you have to restart supervisord service supervisor restart.