mk-conn/shellax

This package is abandoned and no longer maintained. No replacement package was suggested.

Some shell helper commands for laravel applications

0.3.9 2018-03-26 14:08 UTC

This package is auto-updated.

Last update: 2020-11-07 14:21:16 UTC


README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

Laravel package to ease deployments - running tasks after deploy/install like cache cleaning, adding supervisor programms ...

Install

Via Composer

$ composer require mk-conn/shellax

Usage

In your config/app.php add the Shellax service provider like so:

'providers' => // ... other providers 

    MkConn\Shellax\Providers\ShellaxServiceProvider::class,
    

Publish the shellax config

php artisan vendor:publish --provider="MkConn\Shellax\Providers\ShellaxServiceProvider"

Available artisan commands

php artisan shellax:postintall
php artisan shellax:supervisor-register
php artisan shellax:setup-cron

Configuration

Example configuration

<?php

$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')
    ]
];

Change log

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Security

If you discover any security related issues, please email :author_email instead of using the issue tracker.

Credits

License

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