use DATABASE_URL for database configuration
This commit is contained in:
parent
916b72d58d
commit
8aedb36fac
1 changed files with 3 additions and 7 deletions
|
|
@ -1,21 +1,17 @@
|
||||||
default: &default
|
default: &default
|
||||||
adapter: postgresql
|
adapter: postgresql
|
||||||
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
||||||
host: <%= ENV['PGHOST'] %>
|
|
||||||
port: <%= ENV['PGPORT'] %>
|
|
||||||
username: <%= ENV['PGUSER'] %>
|
|
||||||
password: <%= ENV['PGPASSWORD'] %>
|
|
||||||
encoding: utf8
|
encoding: utf8
|
||||||
timeout: 5000
|
timeout: 5000
|
||||||
|
|
||||||
production:
|
production:
|
||||||
<<: *default
|
<<: *default
|
||||||
database: <%= ENV['PGDATABASE'] %>
|
url: <%= ENV['DATABASE_URL'] %>
|
||||||
|
|
||||||
development:
|
development:
|
||||||
<<: *default
|
<<: *default
|
||||||
database: hensei_dev
|
url: <%= ENV.fetch('DATABASE_URL', 'postgres://localhost/hensei_dev') %>
|
||||||
|
|
||||||
test:
|
test:
|
||||||
<<: *default
|
<<: *default
|
||||||
database: hensei_test
|
url: <%= ENV.fetch('DATABASE_URL', 'postgres://localhost/hensei_test') %>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue