From 1d786ff328183a6574baf26076206225875a8f3e Mon Sep 17 00:00:00 2001
From: Paul Mather <pmather@vt.edu>
Date: Mon, 8 Feb 2016 12:48:10 -0500
Subject: [PATCH] Increase database.yml options

Amend database.yml so that an optional "host" and "port" option may be
specified via config/secrets.yml.  This will allow the application to
point to a PostgreSQL database running on a different host.
---
 config/database.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/config/database.yml b/config/database.yml
index 71dc6fc..db475fb 100644
--- a/config/database.yml
+++ b/config/database.yml
@@ -4,6 +4,8 @@ default: &default
   database: <%= Rails.application.secrets['database']['name'] %>
   username: <%= Rails.application.secrets['database']['username'] %>
   password: <%= Rails.application.secrets['database']['password'] %>
+  <%= "host: #{Rails.application.secrets['database']['host']}" unless Rails.application.secrets['database']['host'].nil? %>
+  <%= "port: #{Rails.application.secrets['database']['port']}" unless Rails.application.secrets['database']['port'].nil? %>
 
 development:
   <<: *default
-- 
GitLab