Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. #### 1. Installing Supervisor on Linux
  2. To install supervisor, use the following command.
  3.  
  4. ```sudo apt-get install supervisor```
  5.  
  6. #### 2. Supervisor configuration for Laravel
  7. After installation, create supervisor configuration file with instructions to run the processes. To create a configuration file, execute the following command.
  8. ```sudo nano /etc/supervisor/conf.d/project-name-queue-worker.conf```
  9.  
  10. ```
  11. [program:project-name-queue-worker]
  12. process_name=%(program_name)s_%(process_num)02d
  13. command=php /path/to/project/artisan queue:work
  14. autostart=true
  15. autorestart=true
  16. user=root
  17. numprocs=3
  18. redirect_stderr=true
  19. stdout_logfile=/path/to/project/storage/logs/queue-worker.log
  20. ```
  21.  
  22. #### 3. Starting Supervisor
  23. Now to start the queue worker.
  24.  
  25. ```
  26. sudo supervisorctl reread
  27. sudo supervisorctl update
  28. sudo supervisorctl start laravel-queue-worker:*
  29. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement