discourse/config/database.yml

52 lines
1.7 KiB
YAML
Raw Normal View History

development:
adapter: postgresql
database: discourse_development
min_messages: warning
host: localhost
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:
adapter: postgresql
database: discourse_test
min_messages: warning
host: localhost
pool: 5
timeout: 5000
host_names:
- test.localhost
# profile db is used for benchamarking using the script/bench.rb script
profile:
adapter: postgresql
database: discourse_profile
min_messages: warning
host: localhost
pool: 5
timeout: 5000
host_names:
- "localhost"
production:
pool: <%= ENV['POSTGRES_CONNECTION_POOL'] || 5 %>
timeout: 5000
adapter: postgresql
2013-12-18 01:21:01 -05:00
uri: <%= uri = URI.parse(ENV['POSTGRES_URL'] ? ENV['POSTGRES_URL'] : "pg://localhost") %>
socket: <%= ENV['POSTGRES_SOCKET'] %>
host: <%= ENV['POSTGRES_SOCKET'].present? ? nil : uri.host %>
port: <%= uri.port || (ENV['POSTGRES_SOCKET'].present? ? nil : 5432) %>
2013-12-18 00:54:47 -05:00
database: <%= ENV['POSTGRES_DB'] || "discourse" %>
username: <%= uri.user %>
password: <%= uri.password %>
host_names:
2013-12-18 17:59:44 -05:00
- <%= ENV["DISCOURSE_HOSTNAME"] || raise("env var for DISCOURSE_HOSTNAME must be set") if Rails.env == "production" %> # Update this to be the domain of your production site