61 lines
1.8 KiB
YAML
61 lines
1.8 KiB
YAML
# SQLite. Versions 3.8.0 and up are supported.
|
|
# gem install sqlite3
|
|
#
|
|
# Ensure the SQLite 3 gem is defined in your Gemfile
|
|
# gem "sqlite3"
|
|
#
|
|
default: &default
|
|
adapter: sqlite3
|
|
max_connections: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
|
timeout: 5000
|
|
|
|
development:
|
|
primary:
|
|
<<: *default
|
|
database: storage/development.sqlite3
|
|
queue:
|
|
<<: *default
|
|
database: storage/development_queue.sqlite3
|
|
migrations_paths: db/queue_migrate
|
|
|
|
# Warning: The database defined as "test" will be erased and
|
|
# re-generated from your development database when you run "rake".
|
|
# Do not set this db to the same as development or production.
|
|
test:
|
|
primary:
|
|
<<: *default
|
|
database: storage/test.sqlite3
|
|
queue:
|
|
<<: *default
|
|
database: storage/test_queue.sqlite3
|
|
migrations_paths: db/queue_migrate
|
|
|
|
# PostgreSQL for production.
|
|
#
|
|
# Configure via DATABASE_URL environment variable:
|
|
# postgresql://user:password@host:5432/database
|
|
#
|
|
# Or via individual variables:
|
|
# DB_NAME, DB_USER, DB_PASSWORD, DB_HOST, DB_PORT
|
|
#
|
|
production:
|
|
primary:
|
|
adapter: postgresql
|
|
encoding: unicode
|
|
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
|
database: <%= ENV["DB_NAME"] %>
|
|
username: <%= ENV["DB_USER"] %>
|
|
password: <%= ENV["DB_PASSWORD"] %>
|
|
host: <%= ENV["DB_HOST"] %>
|
|
port: <%= ENV["DB_PORT"] || 5432 %>
|
|
queue:
|
|
adapter: postgresql
|
|
encoding: unicode
|
|
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
|
database: <%= ENV["QUEUE_DB_NAME"] || ENV["DB_NAME"] %>
|
|
username: <%= ENV["QUEUE_DB_USER"] || ENV["DB_USER"] %>
|
|
password: <%= ENV["QUEUE_DB_PASSWORD"] || ENV["DB_PASSWORD"] %>
|
|
host: <%= ENV["QUEUE_DB_HOST"] || ENV["DB_HOST"] %>
|
|
port: <%= ENV["QUEUE_DB_PORT"] || ENV["DB_PORT"] || 5432 %>
|
|
migrations_paths: db/queue_migrate
|