akkounts/config/database.yml
2023-02-13 21:56:32 +08:00

56 lines
1.7 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
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
timeout: 5000
development:
primary:
<<: *default
database: db/development.sqlite3
lndhub:
<<: *default
adapter: postgresql
database_tasks: false
host: <%= ENV.fetch("LNDHUB_PG_HOST") { 'localhost' } %>
port: <%= ENV.fetch("LNDHUB_PG_PORT") { 5432 } %>
database: <%= ENV.fetch("LNDHUB_PG_DATABASE") { 'lndhub' } %>
username: <%= ENV.fetch("LNDHUB_PG_USERNAME") { 'lndhub' } %>
password: <%= ENV.fetch("LNDHUB_PG_PASSWORD") %>
# 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: db/test.sqlite3
lndhub:
<<: *default
database_tasks: false
database: db/test.lndhub.sqlite3
production:
primary:
<<: *default
adapter: postgresql
database: akkounts
port: 5432
host: <%= Rails.application.credentials.postgres[:host] rescue nil %>
username: <%= Rails.application.credentials.postgres[:username] rescue nil %>
password: <%= Rails.application.credentials.postgres[:password] rescue nil %>
lndhub:
<<: *default
adapter: postgresql
database_tasks: false
host: <%= ENV.fetch("LNDHUB_PG_HOST") { 'localhost' } %>
port: <%= ENV.fetch("LNDHUB_PG_PORT") { 5432 } %>
database: <%= ENV.fetch("LNDHUB_PG_DATABASE") { 'lndhub' } %>
username: <%= ENV.fetch("LNDHUB_PG_USERNAME") { 'lndhub' } %>
password: <%= ENV.fetch("LNDHUB_PG_PASSWORD") %>