From f76a22432856d7d05f0182fd674f24d71ca6ffcc Mon Sep 17 00:00:00 2001 From: masarakki Date: Tue, 17 Oct 2017 18:45:37 +0900 Subject: [PATCH] use-DB_NAME-in-development (#5430) --- config/database.yml | 4 ++-- streaming/index.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/database.yml b/config/database.yml index f74635a369..82e560515c 100644 --- a/config/database.yml +++ b/config/database.yml @@ -6,7 +6,7 @@ default: &default development: <<: *default - database: mastodon_development + database: <%= ENV['DB_NAME'] || 'mastodon_development' %> username: <%= ENV['DB_USER'] %> password: <%= ENV['DB_PASS'] %> host: <%= ENV['DB_HOST'] %> @@ -17,7 +17,7 @@ development: # Do not set this db to the same as development or production. test: <<: *default - database: mastodon_test<%= ENV['TEST_ENV_NUMBER'] %> + database: <%= ENV['DB_NAME'] || 'mastodon' %>_test<%= ENV['TEST_ENV_NUMBER'] %> username: <%= ENV['DB_USER'] %> password: <%= ENV['DB_PASS'] %> host: <%= ENV['DB_HOST'] %> diff --git a/streaming/index.js b/streaming/index.js index 017073fa11..83903b89b2 100644 --- a/streaming/index.js +++ b/streaming/index.js @@ -80,7 +80,7 @@ const startWorker = (workerId) => { development: { user: process.env.DB_USER || pg.defaults.user, password: process.env.DB_PASS || pg.defaults.password, - database: 'mastodon_development', + database: process.env.DB_NAME || 'mastodon_development', host: process.env.DB_HOST || pg.defaults.host, port: process.env.DB_PORT || pg.defaults.port, max: 10,