Add options for selecting custom database connection adapters and params [SCI-11083] (#7875)

This commit is contained in:
Alex Kriuchykhin 2024-09-24 13:02:18 +02:00 committed by GitHub
parent f7bb153dcc
commit c2763c7302
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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