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 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) %> database: <%= ENV['POSTGRES_DB'] || "discourse" %> username: <%= uri.user %> password: <%= uri.password %> host_names: - <%= ENV["DISCOURSE_HOSTNAME"] || raise("env var for DISCOURSE_HOSTNAME must be set") %> # Update this to be the domain of your production site