aboutcoders/supervisor-bundle
Symfony bundle for managing Supervisor via supervisorphp/supervisor. Provides Symfony console commands and a JSON REST API to control Supervisor instances and processes, with docs for installation, configuration, and API/command reference.
supervisorphp/supervisor, which is a PHP library for interacting with Supervisor. Laravel (v5.5+) can integrate Symfony bundles via Symfony Bridge (symfony/flex), making adoption feasible with minor adjustments.supervisorctl).config/ structure (e.g., replacing Symfony’s YAML/XML with Laravel’s PHP arrays).Route::prefix('api/supervisor')->group(...)).EventDispatcher vs. Laravel’s Illuminate\Events).supervisorphp/supervisor may not support all Supervisor versions (e.g., newer Unix socket protocols).auth:sanctum) for protection.failed_jobs table) without custom logic.php artisan queue:work)? Will it replace them or run in parallel?config/supervisor.php?Http::post()) for API calls?Console, HttpFoundation).supervisorphp/supervisor library directly.Console/Kernel.php.RouteServiceProvider).Installation:
composer.json:
"require": {
"aboutcoders/supervisor-bundle": "^1.0",
"symfony/flex": "^1.0" // For Symfony Bridge
}
php artisan vendor:publish --tag=supervisor-config
Console Commands:
app/Console/Kernel.php:
protected $commands = [
\AbcSupervisorBundle\Command\SupervisorCommand::class,
];
REST-API:
routes/api.php:
Route::prefix('api/supervisor')->group(function () {
$router->mount(__DIR__.'/../vendor/aboutcoders/supervisor-bundle/Resources/config/routes.yaml');
});
auth:api).Service Provider:
namespace App\Providers;
use AbcSupervisorBundle\AbcSupervisorBundle;
class SupervisorServiceProvider extends \Illuminate\Support\ServiceProvider {
public function register() {
$this->app->register(AbcSupervisorBundle::class);
}
}
supervisord -v).supervisorphp/supervisor supports Laravel’s PHP version (e.g., 8.0+)./etc/supervisor/conf.d/laravel-worker.conf).config/supervisor.php (e.g., queue workers, cron jobs).php artisan supervisor:list
php artisan supervisor:start my_worker
monolog).aboutcoders/supervisor-bundle for Symfony compatibility breaks./etc/supervisor/supervisord.conf) may require bundle updates.symfony/yaml).supervisord.log. Laravel’s logs may not capture all Supervisor events.supervisorphp/supervisor docs for troubleshooting.supervisorctl access as a backup.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Supervisor service crashes | Background jobs fail silently. | Use Laravel’s queue:failed table + monitoring (e.g., Healthchecks). |
| Bundle config misconfiguration | Processes fail to start. | Validate config with php artisan supervisor:validate. |
| REST-API exposed publicly | Unauthorized process control. | Restrict API to internal network + Laravel auth. |
| PHP version incompatibility | Bundle commands fail. | Pin supervisorphp/supervisor version in composer.json. |
| Laravel cache cleared | Supervisor config lost. | Store critical config in config/supervisor.php (not cache). |
program: stanzas) and Laravel’s service container.config/supervisor.php.supervisorctl as a fallback.telescope to monitor Supervisor-triggered events.monolog for centralized logging.How can I help you explore Laravel packages today?