This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

Auto register symfony app with Consul

0.1.1 2020-03-28 08:12 UTC

This package is auto-updated.

Last update: 2021-10-23 10:17:25 UTC


Register and deregister your Symfony application in Consul

Consul Service

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:

  resource: '@ConsulBundle/Resources/config/routing.yml'

Configuration reference:

    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 
    base_uri: # consule server uri

3. Use

Available commands:

  • bin/console consul:register - register application in Consul
  • bin/console consul:deregister - deregister application from Consul
  • bin/console debug:consul-check - debug Consul check