1. Go to this page and download the library: Download mk-conn/shellax library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mk-conn / shellax example snippets
'providers' => // ... other providers
MkConn\Shellax\Providers\ShellaxServiceProvider::class,
$dir = __DIR__;
$dir = realpath($dir . '/..');
return [
// post install tasks - e.g. cache clearing, running migrations, etc...
'postinstall' => [
'artisan' => [
'shellax:supervisor-register' => [
'--name' => 'your-fancy-name-here',
'--user' => 'nginx', // user to run the following command
'--command' => "/usr/bin/php {$dir}/artisan queue:work --tries=3 --timeout=10",
'--logfile' => '/var/log/laravel-queue.log',
'--numprocs' => '4', // number of processes to run by supervisor
]
],
'shell' => [
'/etc/whatever-should-run -arg1'
]
],
'supervisor' => [
'config_dir' => env('SUPERVISOR_CONFIG_DIR', '/etc/supervisor.d'),
'config_ext' => env('SUPERVISOR_CONFIG_EXT', '.conf'),
'supervisor_bin_dir' => env('SUPERVISOR_BIN_DIR', '/usr/bin')
]
];