akondas / symfony-consul-bundle
Auto register symfony app with Consul
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 1
Open Issues: 0
Type:symfony-bundle
Requires
- sensiolabs/consul-php-sdk: ^3.1
- symfony/console: ^5.0
- symfony/framework-bundle: ^5.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- phpstan/extension-installer: ^1.0
- phpstan/phpstan: ^0.12.14
- phpstan/phpstan-phpunit: ^0.12.6
- phpstan/phpstan-symfony: ^0.12.4
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2021-03-23 09:12:11 UTC
README
Register and deregister your Symfony application in Consul
1. Install
composer require akondas/symfony-consul-bundle
2. Configure
Enable this bundle in Symfony, add this line to your bundles.php
file:
Akondas\ConsulBundle\ConsulBundle::class => ['all' => true]
Add routing:
consul_bundle: resource: '@ConsulBundle/Resources/config/routing.yml'
Configuration reference:
consul: service: name: 'subscription-service' # name of your app host: 'localhost' # host of your application under which it is available port: 8000 # port of your application under which it is available client: base_uri: http://127.0.0.1:8500 # consule server uri
3. Use
Available commands:
bin/console consul:register
- register application in Consulbin/console consul:deregister
- deregister application from Consulbin/console debug:consul-check
- debug Consul check