mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 15:40:51 +08:00
153eca23e3
This is useful if you use multiple development databases locally and don't want to constantly `db:drop db:create` into `discourse_development`. Simply add `DISCOURSE_DEV_DB=whatever_db` as an ENV variable and Discourse will use it in development mode.
44 lines
1.4 KiB
YAML
44 lines
1.4 KiB
YAML
development:
|
|
prepared_statements: false
|
|
adapter: postgresql
|
|
database: <%= ENV['DISCOURSE_DEV_DB'] || 'discourse_development' %>
|
|
min_messages: warning
|
|
pool: 5
|
|
timeout: 5000
|
|
host_names:
|
|
### Don't include the port number here. Change the "port" site setting instead, at /admin/site_settings.
|
|
### If you change this setting you will need to
|
|
### - restart sidekiq if you change this setting
|
|
### - rebake all to posts using: `RAILS_ENV=production bundle exec rake posts:rebake`
|
|
- "localhost"
|
|
|
|
# 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:
|
|
prepared_statements: false
|
|
adapter: postgresql
|
|
database: discourse_test<%= ENV['MULTISITE'] ? "_#{ENV['MULTISITE']}" : '' %>
|
|
min_messages: warning
|
|
pool: 5
|
|
timeout: 5000
|
|
host_names:
|
|
- test.localhost
|
|
|
|
# profile db is used for benchmarking using the script/bench.rb script
|
|
profile:
|
|
prepared_statements: false
|
|
adapter: postgresql
|
|
database: discourse_profile
|
|
min_messages: warning
|
|
pool: 5
|
|
timeout: 5000
|
|
host_names:
|
|
- "localhost"
|
|
|
|
# You may be surprised production is not here, it is sourced from application.rb using a monkey patch
|
|
# This is done for 2 reasons
|
|
#
|
|
# 1. we need to support blank settings correctly and rendering nothing in yaml/erb is a PITA
|
|
# 2. why go from object -> yaml -> object, pointless
|