Skip to content

Commit

Permalink
Support redis authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
nanaya committed Nov 7, 2023
1 parent 6f5188e commit 7f360c9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ DB_USERNAME=osuweb
# REDIS_HOST=127.0.0.1
# REDIS_PORT=6379
# REDIS_DB=0
# REDIS_PASSWORD=

# CACHE_REDIS_HOST=127.0.0.1
# CACHE_REDIS_PORT=6379
# CACHE_REDIS_DB=0
# CACHE_REDIS_PASSWORD=

# MEMCACHED_PERSISTENT_ID=
# MEMCACHED_USERNAME=
Expand Down Expand Up @@ -253,6 +255,7 @@ CLIENT_CHECK_VERSION=false
# NOTIFICATION_REDIS_HOST=127.0.0.1
# NOTIFICATION_REDIS_PORT=6379
# NOTIFICATION_REDIS_DB=0
# NOTIFICATION_REDIS_PASSWORD=
# NOTIFICATION_SERVER_LISTEN_HOST=127.0.0.1
# NOTIFICATION_SERVER_LISTEN_PORT=3000
# NOTIFICATION_ENDPOINT=/home/notifications/feed
Expand Down
3 changes: 3 additions & 0 deletions config/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,20 +132,23 @@
'host' => presence(env('CACHE_REDIS_HOST')) ?? presence(env('REDIS_HOST')) ?? '127.0.0.1',
'port' => get_int(env('CACHE_REDIS_PORT')) ?? get_int(env('REDIS_PORT')) ?? 6379,
'database' => get_int(env('CACHE_REDIS_DB')) ?? 0,
'password' => presence(env('CACHE_REDIS_PASSWORD')) ?? presence(env('REDIS_PASSWORD')),
'persistent' => true,
],

'default' => [
'host' => presence(env('REDIS_HOST')) ?? '127.0.0.1',
'port' => get_int(env('REDIS_PORT')) ?? 6379,
'database' => get_int(env('REDIS_DB')) ?? 0,
'password' => presence(env('REDIS_PASSWORD')),
'persistent' => true,
],

'notification' => [
'host' => presence(env('NOTIFICATION_REDIS_HOST')) ?? '127.0.0.1',
'port' => get_int(env('NOTIFICATION_REDIS_PORT')) ?? 6379,
'database' => get_int(env('NOTIFICATION_REDIS_DB')) ?? 0,
'password' => presence(env('NOTIFICATION_REDIS_PASSWORD')),
'persistent' => true,
],

Expand Down

0 comments on commit 7f360c9

Please sign in to comment.