Skip to content

Commit

Permalink
Only set db host if variable is specified
Browse files Browse the repository at this point in the history
Not everybody is using a db running on host but on a socket instead.
  • Loading branch information
tvdeyen committed Sep 12, 2021
1 parent e82f50b commit 6001d60
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spec/dummy/config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ postgresql: &postgresql
defaults: &defaults
pool: 5
timeout: 5000
host: <%= ENV['DB_HOST'] || "localhost" %>
<% if ENV['DB_HOST'] %>
host: <%= ENV['DB_HOST'] %>
<% end %>
<<: *<%= ENV['DB'] || "sqlite" %>

development:
Expand Down

0 comments on commit 6001d60

Please sign in to comment.