coka/service-discovery-bundle
Make sure Composer is installed globally, as explained in the installation chapter of the Composer documentation.
Open a command console, enter your project directory and execute:
$ composer require coka/service-discovery-bundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
$ composer require coka/service-discovery-bundle
Then, enable the bundle by adding it to the list of registered bundles
in the config/bundles.php file of your project:
// config/bundles.php
return [
// ...
Oka\ServiceDiscoveryBundle\OkaServiceDiscoveryBundle::class => ['all' => true],
];
Add the following configuration in the file config/packages/oka_service_discovery.yaml.
# config/packages/oka_service_discovery.yaml
oka_service_discovery:
cache_id: cache.app
load_balancing_algorithm: round-robin
dsn: 'php://array'
options:
# Put the options of PHP Array Catalog
services:
localhost:
- scheme: 'http'
host: 127.0.0.1
port: 80
- scheme: 'http'
host: 127.0.0.1
port: 8080
- scheme: 'https'
host: 127.0.0.1
port: 443
How can I help you explore Laravel packages today?