diff --git a/config/database.yml b/config/database.yml index e3610dd..5d48942 100644 --- a/config/database.yml +++ b/config/database.yml @@ -1,8 +1,20 @@ +# If you want to change this file, please keep the changes in your working +# copy by using +# +# git update-index --skip-worktree config/database.yml +# +# or just use DATABASE_URL, in which case Rails will happily skip the whole +# file. +# +# See https://github.com/coopdevs/timeoverflow/wiki/Keeping-your-local-files +# for more information +# + defaults: &defaults adapter: postgresql - host: <%= ENV.fetch('DATABASE_HOST', 'localhost') %> - username: <%= ENV.fetch('DATABASE_USER', 'null') %> - password: <%= ENV.fetch('DATABASE_PASSWORD', 'null') %> + host: <%= ENV['DATABASE_HOST'] %> # default is localhost + username: <%= ENV['DATABASE_USER'] %> # default is null + password: <%= ENV['DATABASE_PASSWORD'] %> # default is null encoding: utf8 development: @@ -14,4 +26,5 @@ test: database: <%= ENV.fetch('DATABASE_NAME', 'timeoverflow_test') %> production: - url: <%= ENV.fetch('DATABASE_URL', 'Set DATABASE_URL environment variable') %> + # Set DATABASE_URL environment variable + url: <%= ENV['DATABASE_URL'] %>