Skip to content

Commit

Permalink
update redis config (#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
joedixon authored Dec 21, 2023
1 parent 03bc115 commit 24e5a08
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/ConfiguresRedis.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,14 @@ protected function ensureRedisIsConfigured()

Config::set('database.redis', array_merge(Arr::except(Config::get('database.redis', []), ['default', 'cache']), [
'client' => $_ENV['REDIS_CLIENT'] ?? 'phpredis',
'options' => array_merge(Config::get('database.redis.options', []), [
'cluster' => $_ENV['REDIS_CLUSTER'] ?? 'redis',
]),
'options' => array_merge(
Config::get('database.redis.options', []),
array_filter([
'cluster' => $_ENV['REDIS_CLUSTER'] ?? 'redis',
'scheme' => $_ENV['REDIS_SCHEME'] ?? null,
'context' => array_filter(['cafile' => $_ENV['REDIS_SSL_CA'] ?? null]),
])
),
'clusters' => array_merge(Config::get('database.redis.clusters', []), [
'default' => [
[
Expand Down

0 comments on commit 24e5a08

Please sign in to comment.