Files
danbooru/config/database.yml
evazion 0563ca3001 docs: document config/ and some directories in app/.
* Add README files to several directories in app/ giving a brief
  overview of some parts of Danbooru's architecture.
* Add documentation for files in config/.
2021-06-27 05:21:38 -05:00

59 lines
1.5 KiB
YAML

# This file contains database configuration. Don't edit this file. To override
# this file, set `DATABASE_URL` in .env.local instead.
#
# By default, with no configuration, we try to connect to the Postgres server
# running on localhost with username `danbooru` and database name `danbooru2`.
#
# Example:
#
# # Connect to the database named `danbooru2` via localhost on port 5432
# DATABASE_URL=postgresql://localhost/danbooru2
#
# # Connect via Unix domain socket in /var/run/postgresql
# # https://zaiste.net/posts/postgresql-unix-socket-tcpip-loopback/
# DATABASE_URL=postgresql://%2Fvar%2Frun%2Fpostgresql/danbooru2
#
# The general form for a database URL is:
#
# postgresql://[user[:password]@][host][:port][/dbname][?param1=value1&...]`
#
# The default is:
#
# postgresql://danbooru@localhost/danbooru2
#
# @see https://guides.rubyonrails.org/configuring.html#configuring-a-database
# @see https://www.postgresql.org/docs/current/libpq-connect.html#id-1.7.3.8.3.6
default: &default
adapter: postgresql
username: danbooru
host: localhost
url: <%= ENV["DATABASE_URL"] %>
production:
<<: *default
database: danbooru2
development:
<<: *default
database: danbooru2
test:
<<: *default
database: danbooru2_test
archive_production:
<<: *default
database: archive_production
url: <%= ENV["ARCHIVE_DATABASE_URL"] %>
archive_development:
<<: *default
database: archive_development
url: <%= ENV["ARCHIVE_DATABASE_URL"] %>
archive_test:
<<: *default
database: archive_test
url: <%= ENV["ARCHIVE_DATABASE_URL"] %>