DEV Community

Rupadana
Rupadana

Posted on

Install and Manage Supervisor for Laravel Queue

Introduction

In this post im using ubuntu 22.04, read the installation step below

Installation

Begin by updating your package sources and installing Supervisor:

sudo apt update && sudo apt install supervisor
Enter fullscreen mode Exit fullscreen mode

The supervisor service runs automatically after installation. You can check its status:

sudo systemctl status supervisor
Enter fullscreen mode Exit fullscreen mode

You should receive the following output:

Output
● supervisor.service - Supervisor process control system for UNIX
     Loaded: loaded (/lib/systemd/system/supervisor.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2021-11-17 22:56:48 UTC; 5min ago
Enter fullscreen mode Exit fullscreen mode

Add configuration

create app.rupadana.com.conf configuration to /etc/supervisor/conf.d, and paste it

[program:rupadana-app]
process_name=%(program_name)s_%(process_num)02d
command=php /home/rupadana-app/htdocs/app.rupadana.com/artisan queue:work --sleep=3 --tries=3
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
user=rupadana-app
numprocs=2
redirect_stderr=true
stdout_logfile = /home/app/htdocs/app.rupadana.com/worker.log
stopwaitsecs=3600
Enter fullscreen mode Exit fullscreen mode

and enter this command to run configuration

sudo supervisorctl reread
sudo supervisorctl update
Enter fullscreen mode Exit fullscreen mode

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Top comments (1)

Collapse
 
rupadana profile image
Rupadana

Hi, kindly leave a like and comment if you got new insight! 🔥

The Most Contextual AI Development Assistant

Pieces.app image

Our centralized storage agent works on-device, unifying various developer tools to proactively capture and enrich useful materials, streamline collaboration, and solve complex problems through a contextual understanding of your unique workflow.

👥 Ideal for solo developers, teams, and cross-company projects

Learn more