2017 © Pedro Peláez
 

library supervisor

Generate Supervisor config for monitoring Laravel worker process

image

matriphe/supervisor

Generate Supervisor config for monitoring Laravel worker process

  • Monday, February 19, 2018
  • by matriphe
  • Repository
  • 2 Watchers
  • 2 Stars
  • 98 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 92 % Grown

The README.md

Laravel Supervisor Config Generator

Build Status Total Download Latest Stable Version, (*1)

This package generates Supervisor config that used by Laravel to monitor queue worker and Laravel Horizon. Make sure Supervisor is installed properly., (*2)

Installation

Using Composer, just run this command below., (*3)

composer require matriphe/supervisor

Configuration

Laravel < 5.5

After installed, open config/app.php and add this line., (*4)

Matriphe\Supervisor\ServiceProvider::class

Laravel > 5.5

Nothing to do, this package is using package auto-discovery., (*5)

Lumen

Open bootstrap.app and add this line., (*6)

$app->register(Matriphe\Supervisor\ServiceProvider::class);

Usage

Generate Laravel Horizon Config

Using root access, run, (*7)

php artisan supervisor:horizon

By default, this will save the configuration file to /etc/supervisor/conf.d directory. To change this, use --path option on the command., (*8)

For more info, just use --help option to see what options available., (*9)

Generate Queue Worker Config

If you don't want to use Laravel Horizon to monitor your queue workers, use this commands. If you're using Laravel Horizon, just ignore this command., (*10)

Using root access, run, (*11)

php artisan supervisor:queue

By default, this command will also save the configuration file to /etc/supervisor/conf.d directory. To change this, use --path option on the command., (*12)

For more info, just use --help option to see what options available., (*13)

Outout

The output of the config file is like this., (*14)

Laravel Horizon

[program:appname-laravel-horizon-default]
command=/usr/bin/php /Volumes/data/Development/php/laravel/55/artisan horizon
process_name=%(process_name)s
priority=999
autostart=true
autorestart=unexpected
startretries=3
stopsignal=QUIT
stderr_logfile=/var/log/supervisor/appname-default.log

Queue Worker

[program:appname-queue-worker-default]
command=/usr/bin/php /Volumes/data/Development/php/laravel/55/artisan queue:work --queue=default --tries=3 --timeout=60
process_num=5
numprocs=5
process_name=%(process_num)s
priority=999
autostart=true
autorestart=unexpected
startretries=3
stopsignal=QUIT
stderr_logfile=/var/log/supervisor/appname-default.log

The file will be named /etc/supervisor/conf.d/appname-default.conf., (*15)

License

The MIT License (MIT). Please see License File for more information., (*16)

The Versions

19/02 2018

dev-master

9999999-dev

Generate Supervisor config for monitoring Laravel worker process

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel config command generator supervisor

19/02 2018

1.1.0

1.1.0.0

Generate Supervisor config for monitoring Laravel worker process

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel config command generator supervisor

12/02 2018

1.0.3

1.0.3.0

Generate Supervisor config for monitoring Laravel worker process

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel config command generator supervisor

08/02 2018

1.0.2

1.0.2.0

Generate Supervisor config for monitoring Laravel worker process

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel config command generator supervisor

08/02 2018

1.0.1

1.0.1.0

Generate Supervisor config for monitoring Laravel worker process

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel config command generator supervisor

12/01 2018

1.0

1.0.0.0

Generate Supervisor config for monitoring Laravel worker process

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel config command generator supervisor