mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 09:42:02 +08:00
FIX(cache_critical_dns): use discourse database name and user by default (#16856)
This commit is contained in:
parent
9ea8a4a9af
commit
9f246e6969
|
@ -20,6 +20,9 @@ CRITICAL_HOST_ENV_VARS = %w{
|
|||
DISCOURSE_REDIS_SLAVE_HOST
|
||||
DISCOURSE_REDIS_REPLICA_HOST
|
||||
}
|
||||
|
||||
DEFAULT_DB_NAME = "discourse"
|
||||
|
||||
HOST_RESOLVER_CACHE = {}
|
||||
HOST_HEALTHY_CACHE = {}
|
||||
HOSTS_PATH = ENV['DISCOURSE_DNS_CACHE_HOSTS_FILE'] || "/etc/hosts"
|
||||
|
@ -171,15 +174,15 @@ HEALTH_CHECKS = {
|
|||
"DISCOURSE_DB_HOST": lambda { |addr|
|
||||
postgres_healthcheck(
|
||||
host: addr,
|
||||
user: ENV["DISCOURSE_DB_USER_NAME"],
|
||||
password: ENV["DISCOURSE_DB_PASSWORD"],
|
||||
dbname: ENV["DISCOURSE_DB_NAME"])},
|
||||
user: ENV["DISCOURSE_DB_USER_NAME"] || DEFAULT_DB_NAME,
|
||||
dbname: ENV["DISCOURSE_DB_NAME"] || DEFAULT_DB_NAME,
|
||||
password: ENV["DISCOURSE_DB_PASSWORD"])},
|
||||
"DISCOURSE_DB_REPLICA_HOST": lambda { |addr|
|
||||
postgres_healthcheck(
|
||||
host: addr,
|
||||
user: ENV["DISCOURSE_DB_USER_NAME"],
|
||||
password: ENV["DISCOURSE_DB_PASSWORD"],
|
||||
dbname: ENV["DISCOURSE_DB_NAME"])},
|
||||
user: ENV["DISCOURSE_DB_USER_NAME"] || DEFAULT_DB_NAME,
|
||||
dbname: ENV["DISCOURSE_DB_NAME"] || DEFAULT_DB_NAME,
|
||||
password: ENV["DISCOURSE_DB_PASSWORD"])},
|
||||
"DISCOURSE_REDIS_HOST": lambda { |addr|
|
||||
redis_healthcheck(
|
||||
host: addr,
|
||||
|
|
Loading…
Reference in New Issue
Block a user