From cbf78a48962f99c283a8d48e6c5789db3b89c5f4 Mon Sep 17 00:00:00 2001 From: Yann Vaillant Date: Thu, 6 Oct 2016 12:27:56 +0200 Subject: [PATCH] Improve database config file Enable us to have custom config for local development --- config/database.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/config/database.yml b/config/database.yml index e0df97ad2c9..a776747916a 100644 --- a/config/database.yml +++ b/config/database.yml @@ -1,7 +1,11 @@ default: &default - adapter: postgresql - pool: 17 - timeout: 5000 + adapter: postgresql + username: <%= ENV['DB_USER'] || 'mastodon' %> + password: <%= ENV['DB_PASS'] || '' %> + host: <%= ENV['DB_HOST'] || 'localhost' %> + port: <%= ENV['DB_PORT'] || 5432 %> + pool: 17 + timeout: 5000 encoding: unicode development: @@ -18,7 +22,3 @@ test: production: <<: *default database: <%= ENV['DB_NAME'] || 'mastodon_production' %> - username: <%= ENV['DB_USER'] || 'mastodon' %> - password: <%= ENV['DB_PASS'] || '' %> - host: <%= ENV['DB_HOST'] || 'localhost' %> - port: <%= ENV['DB_PORT'] || 5432 %>