mirror of
https://github.com/discourse/discourse.git
synced 2025-02-22 09:18:55 +08:00

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>
23 lines
374 B
YAML
23 lines
374 B
YAML
defaults: &defaults
|
|
host: <%= GlobalSetting.redis_host %>
|
|
port: <%= GlobalSetting.redis_port %>
|
|
password: <%= GlobalSetting.redis_password %>
|
|
db: <%= GlobalSetting.redis_db %>
|
|
cache_db: <%= GlobalSetting.redis_cache_db %>
|
|
|
|
development:
|
|
<<: *defaults
|
|
|
|
profile:
|
|
<<: *defaults
|
|
|
|
test:
|
|
<<: *defaults
|
|
db: 1
|
|
|
|
staging:
|
|
<<: *defaults
|
|
|
|
production:
|
|
<<: *defaults
|