mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
Allow configuration of Redis DB and cache DB
Hardcoding the Redis DB and Redis Caching DB to 0 and 2 in `config/database.yml` makes an unsafe assumption that Discourse is the only application using that install of redis-server. Instead of forcing users to undergo yet another form of configuration, allow Discourse admins a nicer way to configure the Redis databases used. Signed-off-by: David Celis <me@davidcel.is>
This commit is contained in:
parent
47e1d00f96
commit
0ed42707cc
2 changed files with 8 additions and 2 deletions
|
@ -73,5 +73,11 @@ redis_host = localhost
|
||||||
# redis server port
|
# redis server port
|
||||||
redis_port = 6379
|
redis_port = 6379
|
||||||
|
|
||||||
|
# redis database
|
||||||
|
redis_db = 0
|
||||||
|
|
||||||
|
# redis database for caching
|
||||||
|
redis_cache_db = 2
|
||||||
|
|
||||||
# redis password
|
# redis password
|
||||||
redis_password =
|
redis_password =
|
||||||
|
|
|
@ -2,8 +2,8 @@ defaults: &defaults
|
||||||
host: <%= GlobalSetting.redis_host %>
|
host: <%= GlobalSetting.redis_host %>
|
||||||
port: <%= GlobalSetting.redis_port %>
|
port: <%= GlobalSetting.redis_port %>
|
||||||
password: <%= GlobalSetting.redis_password %>
|
password: <%= GlobalSetting.redis_password %>
|
||||||
db: 0
|
db: <%= GlobalSetting.redis_db %>
|
||||||
cache_db: 2
|
cache_db: <%= GlobalSetting.redis_cache_db %>
|
||||||
|
|
||||||
development:
|
development:
|
||||||
<<: *defaults
|
<<: *defaults
|
||||||
|
|
Loading…
Reference in a new issue