]> cat aescling's git repositories - mastodon.git/commitdiff
use-DB_NAME-in-development (#5430)
authormasarakki <masaki182@gmail.com>
Tue, 17 Oct 2017 09:45:37 +0000 (18:45 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Tue, 17 Oct 2017 09:45:37 +0000 (11:45 +0200)
config/database.yml
streaming/index.js

index f74635a3690a49bb68625c6e6d83dd06826b15b8..82e560515c872a2ec0be9c03d2843707ce0180b8 100644 (file)
@@ -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'] %>
index 017073fa112fba7c2f8ac00d4020981b31a2e75b..83903b89b2e390cb786ae2f36617c0e5309d0399 100644 (file)
@@ -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,