mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-05 04:03:45 +08:00
Add options for selecting custom database connection adapters and params [SCI-11083] (#7875)
This commit is contained in:
parent
f7bb153dcc
commit
c2763c7302
1 changed files with 6 additions and 1 deletions
|
@ -15,10 +15,15 @@
|
||||||
# gem 'pg'
|
# gem 'pg'
|
||||||
#
|
#
|
||||||
default: &default
|
default: &default
|
||||||
adapter: postgresql
|
adapter: <%= ENV['DATABASE_ADAPTER'] || 'postgresql' %>
|
||||||
encoding: unicode
|
encoding: unicode
|
||||||
pool: <%= ENV['DB_POOL'] || ENV['RAILS_MAX_THREADS'] || 5 %>
|
pool: <%= ENV['DB_POOL'] || ENV['RAILS_MAX_THREADS'] || 5 %>
|
||||||
url: <%= ENV['DATABASE_URL'] %>
|
url: <%= ENV['DATABASE_URL'] %>
|
||||||
|
host: <%= ENV['DATABASE_HOST'] %>
|
||||||
|
port: <%= ENV['DATABASE_PORT'] || 5432 %>
|
||||||
|
username: <%= ENV['DATABASE_USERNAME'] %>
|
||||||
|
password: <%= ENV['DATABASE_PASSWORD'] %>
|
||||||
|
database: <%= ENV['DATABASE_NAME'] %>
|
||||||
|
|
||||||
# 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
|
||||||
|
|
Loading…
Reference in a new issue