2024-02-02 09:05:04 -06:00
|
|
|
default: &default
|
|
|
|
adapter: postgresql
|
|
|
|
encoding: unicode
|
2025-03-17 20:04:38 -04:00
|
|
|
# Note on DB_POOL_SIZE:
|
|
|
|
# -------------------------------------------------------------------------------------------------------------
|
|
|
|
# To optimize for the simplest self-hosting setup, we run ActionCable, GoodJob, and Rails in the same process.
|
|
|
|
#
|
|
|
|
# This requires DB connections for each:
|
|
|
|
#
|
|
|
|
# Puma: Requires 3 connections (Rails default)
|
|
|
|
# ActionCable: 5 connections (Rails defaults to 4 workers + 1 listener for Postgres adapter)
|
|
|
|
# GoodJob: 15 connections to run in "async" mode. See `good_job.rb` for the breakdown.
|
|
|
|
# --------------------------------------------------------------------------------------------
|
|
|
|
# Total: 23 connections
|
|
|
|
#
|
|
|
|
# We default to this value so that self-hosters don't need to configure anything. Hosted mode will require
|
|
|
|
# a different pool size, as we run ActionCable, GoodJob, and Rails in separate processes.
|
|
|
|
#
|
|
|
|
pool: <%= ENV.fetch("DB_POOL_SIZE") { 23 } %>
|
2024-02-02 16:03:46 +00:00
|
|
|
host: <%= ENV.fetch("DB_HOST") { "127.0.0.1" } %>
|
2024-02-26 06:44:07 -05:00
|
|
|
port: <%= ENV.fetch("DB_PORT") { "5432" } %>
|
2024-02-05 23:17:50 -05:00
|
|
|
user: <%= ENV.fetch("POSTGRES_USER") { nil } %>
|
2024-04-13 09:28:45 -04:00
|
|
|
password: <%= ENV.fetch("POSTGRES_PASSWORD") { nil } %>
|
2024-02-02 09:05:04 -06:00
|
|
|
|
|
|
|
development:
|
|
|
|
<<: *default
|
2024-04-13 09:28:45 -04:00
|
|
|
database: <%= ENV.fetch("POSTGRES_DB") { "maybe_development" } %>
|
2024-02-02 09:05:04 -06:00
|
|
|
|
|
|
|
test:
|
|
|
|
<<: *default
|
2024-04-13 09:28:45 -04:00
|
|
|
database: <%= ENV.fetch("POSTGRES_DB") { "maybe_test" } %>
|
2024-02-02 09:05:04 -06:00
|
|
|
|
|
|
|
production:
|
|
|
|
<<: *default
|
2024-04-13 09:28:45 -04:00
|
|
|
database: <%= ENV.fetch("POSTGRES_DB") { "maybe_production" } %>
|