Skip to content

Commit

Permalink
fix(config/database): redis cluster (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonostendorf authored Oct 24, 2023
1 parent 305553f commit d616ed9
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions config/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,24 +124,27 @@
'options' => [
'cluster' => env('REDIS_CLUSTER', 'redis'),
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
'password' => env('REDIS_PASSWORD'),
],

'default' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_DB', '0'),
'clusters' => [
'default' => [
'host' => env('REDIS_HOST', '127.0.0.1'),
'username' => env('REDIS_USERNAME'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_DB', '0'),
'prefix' => '',
],

'cache' => [
'host' => env('REDIS_HOST', '127.0.0.1'),
'username' => env('REDIS_USERNAME'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_CACHE_DB', '1'),
'prefix' => 'cache',
],
],

'cache' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_CACHE_DB', '1'),
],

],

];

0 comments on commit d616ed9

Please sign in to comment.