hotflo / supervisor-bundle
HOTflo SupervisorBundle for the Symfony2 framework
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 313
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.4
- mondalaci/supervisor-client: dev-master
- symfony/framework-bundle: ~2.3
This package is not auto-updated.
Last update: 2022-03-28 15:05:47 UTC
README
This bundle contains a service and commands to control multiple supervisor instances in your Symfony2 project.
Installing the SupervisorBundle
Add the bundle to your AppKernel.php
new Hotflo\SupervisorBundle\HotfloSupervisorBundle(),
Configuring the SupervisorBundle
Add the configuration of the bundle in the application configuration file
hotflo_supervisor:
default_instance: default
instances:
default:
ip: 127.0.0.1
port: 9001
username: guest
password: guest
Configure the Supervisor Instance on your server
Check if your supervisord.conf file contains the inet_http_Server configuration
[inet_http_server]
port = 127.0.0.1:9001
username = guest
password = guest
Using the SupervisorBundle
The service
The services are dynamically generated by dependency injection. The default supervisor instance can be called by:
$this->get('hotflo_supervisor.instance');
If you use multiple supervisor instances in your project you can call the instance by there name:
$this->get('hotflo_supervisor.instance.YOUR_INSTANCE_NAME');
This bundle uses the hlecorche/supervisord-php-client to provide all API calls. Documentation of all the available API calls are available at the Supervisord website http://supervisord.org/api.html.
Commands
By using commands you can control your supervisor in an easy way.
Available commands:
- supervisor:process:start [--all] [instance] [process]
- supervisor:process:stop [--all] [instance] [process]
- supervisor:process:info [--all] [instance] [process]
- supervisor:process:log [--clear] [--offset[="..."]] instance process
- supervisor:shutdown [instance]
- supervisor:restart [instance]
- supervisor:state [instance]
- supervisor:log [--clear] [--offset[="..."]] [instance]
- supervisor:pid [instance]
The shutdown command shuts down the instance. Without server permissions you can't start the server again!
The restart command isn't restarting the instance, it only restarts the processes.