Files
turbovault-app/config/database.yml
2026-03-28 19:24:29 -04:00

60 lines
2.0 KiB
YAML

# PostgreSQL. Versions 9.3 and up are supported.
#
# Install the pg driver:
# gem install pg
# On macOS with Homebrew:
# gem install pg -- --with-pg-config=/usr/local/bin/pg_config
# On Windows:
# gem install pg
# Choose the win32 build.
# Install PostgreSQL and put its /bin directory on your path.
#
# Configure Using Gemfile
# gem "pg"
#
default: &default
adapter: postgresql
encoding: unicode
# For details on connection pooling, see Rails configuration guide
# https://guides.rubyonrails.org/configuring.html#database-pooling
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
host: <%= ENV.fetch("DATABASE_HOST") { "localhost" } %>
username: <%= ENV.fetch("DATABASE_USERNAME") { "postgres" } %>
password: <%= ENV.fetch("DATABASE_PASSWORD") { "postgres" } %>
development:
<<: *default
database: turbovault_web_development
# 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:
<<: *default
database: turbovault_web_test
production:
primary:
<<: *default
database: turbovault_web_production
username: <%= ENV.fetch("DATABASE_USERNAME") { "turbovault_web" } %>
password: <%= ENV["DATABASE_PASSWORD"] %>
cache:
<<: *default
database: turbovault_web_production_cache
username: <%= ENV.fetch("DATABASE_USERNAME") { "turbovault_web" } %>
password: <%= ENV["DATABASE_PASSWORD"] %>
migrations_paths: db/cache_migrate
queue:
<<: *default
database: turbovault_web_production_queue
username: <%= ENV.fetch("DATABASE_USERNAME") { "turbovault_web" } %>
password: <%= ENV["DATABASE_PASSWORD"] %>
migrations_paths: db/queue_migrate
cable:
<<: *default
database: turbovault_web_production_cable
username: <%= ENV.fetch("DATABASE_USERNAME") { "turbovault_web" } %>
password: <%= ENV["DATABASE_PASSWORD"] %>
migrations_paths: db/cable_migrate