Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/akondas/symfony-consul-bundle
Auto register Symfony app with Consul
https://github.com/akondas/symfony-consul-bundle
consul hacktoberfest php symfony symfony-bundle
Last synced: 19 days ago
JSON representation
Auto register Symfony app with Consul
- Host: GitHub
- URL: https://github.com/akondas/symfony-consul-bundle
- Owner: akondas
- License: mit
- Created: 2020-03-08T17:03:04.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-10-01T13:30:21.000Z (about 2 years ago)
- Last Synced: 2024-10-11T13:13:40.247Z (about 1 month ago)
- Topics: consul, hacktoberfest, php, symfony, symfony-bundle
- Language: PHP
- Homepage:
- Size: 188 KB
- Stars: 10
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Symfony Consul Bundle
Register and deregister your Symfony application in [Consul](https://consul.io)
![Consul Service](doc/consul.png)
## 1. Install
```bash
composer require akondas/symfony-consul-bundle
```## 2. Configure
Enable this bundle in Symfony, add this line to your `bundles.php` file:
```php
Akondas\ConsulBundle\ConsulBundle::class => ['all' => true]
```Add routing:
```yaml
consul_bundle:
resource: '@ConsulBundle/Resources/config/routing.yml'
```Configuration reference:
```bash
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 Consul
- `bin/console consul:deregister` - deregister application from Consul
- `bin/console debug:consul-check` - debug Consul check