Configuring Supervisor for UnoPIM
Supervisor is used to manage the job queue daemon for UnoPIM. Follow these steps to set it up.
Step 1: Install Supervisor
Update your package manager:
bashsudo apt updateInstall Supervisor:
bashsudo apt install supervisorVerify the installation:
bashsupervisorctl status
Step 2: Configure Supervisor for UnoPIM
Navigate to the Supervisor configuration directory:
bashcd /etc/supervisor/conf.dCreate a configuration file named
unopim_queue_daemon.conf:bashsudo nano /etc/supervisor/conf.d/unopim_queue_daemon.confAdd the following content:
ini[program:unopim-worker] command=/path/to/php /path/to/your/unopim/artisan queue:work autostart=true autorestart=true user=my_user numprocs=8 process_name=%(program_name)s_%(process_num)02d stderr_logfile=/var/log/unopim_worker.err.log stdout_logfile=/var/log/unopim_worker.out.log stopasgroup=trueNotes:
- Replace
/path/to/phpwith the path to your PHP binary. - Replace
/path/to/your/unopimwith the installation directory of UnoPIM. - Replace
my_userwith the user that runs PHP-FPM (e.g.,www-data).
- Replace
Step 3: Apply Changes
Run the following commands to apply the new Supervisor configuration:
bash
$ supervisorctl reread
$ supervisorctl updateStep 4: Start the Daemon
Start the UnoPIM queue daemon:
bash
$ supervisorctl start unopim_queue_daemonLogs
- Error Log:
/var/log/unopim_worker.err.log - Output Log:
/var/log/unopim_worker.out.log
Monitor these logs for troubleshooting and ensure the queue daemon runs as expected.