Make DB configurable with environment variables
This commit is contained in:
parent
c34955e106
commit
6bbd39dc23
|
@ -20,10 +20,15 @@ default: &default
|
||||||
# For details on connection pooling, see Rails configuration guide
|
# For details on connection pooling, see Rails configuration guide
|
||||||
# http://guides.rubyonrails.org/configuring.html#database-pooling
|
# http://guides.rubyonrails.org/configuring.html#database-pooling
|
||||||
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
||||||
|
database: <%= ENV.fetch("POSTGRES_DB") { "clarion" } %>
|
||||||
|
username: <%= ENV.fetch("POSTGRES_USER") { "clarion" } %>
|
||||||
|
password: <%= ENV["POSTGRES_PASSWORD"] %>
|
||||||
|
host: <%= ENV.fetch("POSTGRES_HOST") { "localhost" } %>
|
||||||
|
port: <%= ENV.fetch("POSTGRES_PORT") { 5432 } %>
|
||||||
|
|
||||||
development:
|
development:
|
||||||
<<: *default
|
<<: *default
|
||||||
database: clarion_development
|
database: <%= ENV.fetch("POSTGRES_DB") { "clarion_development" } %>
|
||||||
|
|
||||||
# The specified database role being used to connect to postgres.
|
# The specified database role being used to connect to postgres.
|
||||||
# To create additional roles in postgres see `$ createuser --help`.
|
# To create additional roles in postgres see `$ createuser --help`.
|
||||||
|
|
Loading…
Reference in New Issue