Files
akkounts/config/database.yml

60 lines
1.8 KiB
YAML
Raw Normal View History

2020-11-07 14:49:32 +01:00
default: &default
adapter: <%= ENV["DB_ADAPTER"] || "sqlite3" %>
2023-02-14 13:16:10 +08:00
pool: <%= ENV["DB_POOL"] || ENV['MAX_THREADS'] || 5 %>
2020-11-07 14:49:32 +01:00
timeout: 5000
<% if ENV["DB_ADAPTER"] == "postgresql" %>
host: <%= ENV["PG_HOST"] || 'localhost' %>
port: <%= ENV["PG_PORT"] || 5432 %>
username: <%= ENV["PG_USERNAME"] || 'akkounts' %>
password: <%= ENV["PG_PASSWORD"] %>
<% end %>
<% if ENV["LNDHUB_PG_HOST"].present? %>
lndhub: &lndhub
adapter: postgresql
database_tasks: false
host: <%= ENV["LNDHUB_PG_HOST"] %>
port: <%= ENV["LNDHUB_PG_PORT"] || 5432 %>
database: <%= ENV["LNDHUB_PG_DATABASE"] || 'lndhub' %>
username: <%= ENV["LNDHUB_PG_USERNAME"] || 'lndhub' %>
password: <%= ENV["LNDHUB_PG_PASSWORD"] %>
<% end %>
2020-11-07 14:49:32 +01:00
development:
primary:
<<: *default
database: <%= ENV["DB_ADAPTER"] == "postgresql" ? ENV["PG_DATABASE"] : "db/development.sqlite3" %>
2025-05-04 17:40:33 +04:00
queue:
<<: *default
database: <%= ENV["DB_ADAPTER"] == "postgresql" ? ENV["PG_DATABASE_QUEUE"] : "db/development_queue.sqlite3" %>
2025-05-04 17:40:33 +04:00
migrations_paths: db/queue_migrate
<% if ENV["LNDHUB_PG_HOST"].present? %>
2023-02-13 21:56:32 +08:00
lndhub:
<<: *lndhub
<% end %>
2020-11-07 14:49:32 +01:00
# 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
2020-11-07 14:49:32 +01:00
production:
primary:
<<: *default
database: <%= ENV["DB_ADAPTER"] == "postgresql" ? ENV["PG_DATABASE"] : "db/production.sqlite3" %>
queue:
<<: *default
database: <%= ENV["DB_ADAPTER"] == "postgresql" ? ENV["PG_DATABASE_QUEUE"] : "db/production_queue.sqlite3" %>
migrations_paths: db/queue_migrate
<% if ENV["LNDHUB_PG_HOST"].present? %>
lndhub:
<<: *lndhub
<% end %>