#1: Made Elasticsearch hosts configurable in an environment variable.

This commit is contained in:
Peter Deltchev 2016-01-17 05:22:14 -08:00
parent 56edd5ec28
commit e295c41243
3 changed files with 6 additions and 4 deletions

View file

@ -30,12 +30,13 @@ return [
*
* This is the only configuration value that is mandatory.
*
* If set in an environment variable, this should be a comma-separated
* list of hostnames. Port numbers are optional; 9200 is the default.
*
* @see https://www.elastic.co/guide/en/elasticsearch/client/php-api/2.0/_configuration.html#_host_configuration
*/
'hosts' => [
'localhost:9200'
],
'hosts' => explode(',', env('ELASTICSEARCH_HOSTS', 'localhost:9200')),
/**
* SSL

View file

@ -19,7 +19,6 @@
*/
use Illuminate\Database\Migrations\Migration;
use Poniverse\Ponyfm\Console\Commands\RebuildSearchIndex;
class SetupElasticsearch extends Migration
{

View file

@ -8,6 +8,8 @@ DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
ELASTICSEARCH_HOSTS=localhost
SESSION_HTTPS_ONLY=false
QUEUE_DRIVER=sync