mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
improve config so you can use it with a socket optionally
This commit is contained in:
parent
786f488186
commit
14d21ec865
1 changed files with 2 additions and 2 deletions
|
@ -42,8 +42,8 @@ production:
|
|||
adapter: postgresql
|
||||
uri: <%= uri = URI.parse(ENV['POSTGRES_URL'] ? ENV['POSTGRES_URL'] : "pg://localhost") %>
|
||||
socket: <%= ENV['POSTGRES_SOCKET'] %>
|
||||
host: <%= uri.host %>
|
||||
port: <%= uri.port || (ENV['POSTGRES_SOCKET'] ? nil : 5432) %>
|
||||
host: <%= ENV['POSTGRES_SOCKET'].present? ? nil : uri.host %>
|
||||
port: <%= uri.port || (ENV['POSTGRES_SOCKET'].present? ? nil : 5432) %>
|
||||
database: <%= ENV['POSTGRES_DB'] || "discourse" %>
|
||||
username: <%= uri.user %>
|
||||
password: <%= uri.password %>
|
||||
|
|
Loading…
Reference in a new issue