attempt to bypass setting port if socket is provided

This commit is contained in:
Sam 2013-12-18 17:48:54 +11:00
parent a7421f8612
commit a85333790f
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ production:
uri: <%= uri = URI.parse(ENV['POSTGRES_URL'] ? ENV['POSTGRES_URL'] : "pg://localhost") %>
socket: <%= ENV['POSTGRES_SOCKET'] %>
host: <%= uri.host %>
port: <%= uri.port || 5432 %>
port: <%= uri.port || (ENV['POSTGRES_SOCKET'] ? nil : 5432) %>
database: <%= ENV['POSTGRES_DB'] || "discourse" %>
username: <%= uri.user %>
password: <%= uri.password %>