mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 14:07:30 +08:00
IMPORTANT - removed all sample files
This is very likely to cause merge conflict, it is for the greater good Discuss at: http://meta.discourse.org/t/enough-with-the-sample-files/10351 From now on we use ENV to customise if needed
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@ -23,10 +23,7 @@ public/plugins/*
|
|||||||
|
|
||||||
/public/assets/*
|
/public/assets/*
|
||||||
|
|
||||||
config/database.yml
|
|
||||||
config/redis.yml
|
|
||||||
config/discourse.pill
|
config/discourse.pill
|
||||||
config/environments/production.rb
|
|
||||||
|
|
||||||
# Ignore the default SQLite database and db dumps
|
# Ignore the default SQLite database and db dumps
|
||||||
/db/*.sqlite3
|
/db/*.sqlite3
|
||||||
|
@ -25,19 +25,7 @@ test:
|
|||||||
host_names:
|
host_names:
|
||||||
- test.localhost
|
- test.localhost
|
||||||
|
|
||||||
# using the test db, so jenkins can run this config
|
# profile db is used for benchamarking using the script/bench.rb script
|
||||||
# we need it to be in production so it minifies assets
|
|
||||||
production:
|
|
||||||
adapter: postgresql
|
|
||||||
database: discourse_development
|
|
||||||
pool: 5
|
|
||||||
timeout: 5000
|
|
||||||
host_names:
|
|
||||||
### 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`
|
|
||||||
- production.localhost # Update this to be the domain of your production site
|
|
||||||
|
|
||||||
profile:
|
profile:
|
||||||
adapter: postgresql
|
adapter: postgresql
|
||||||
database: discourse_profile
|
database: discourse_profile
|
||||||
@ -47,3 +35,17 @@ profile:
|
|||||||
timeout: 5000
|
timeout: 5000
|
||||||
host_names:
|
host_names:
|
||||||
- "localhost"
|
- "localhost"
|
||||||
|
|
||||||
|
production:
|
||||||
|
pool: <%= ENV['POSTGRES_CONNECTION_POOL'] || 5 %>
|
||||||
|
timeout: 5000
|
||||||
|
adapter: postgresql
|
||||||
|
uri: <%= uri = URI.parse(ENV['POSTGRES_URL']) %>
|
||||||
|
socket: <%= ENV['POSTGRES_SOCKET'] %>
|
||||||
|
host: <%= uri.host %>
|
||||||
|
port: <%= uri.port || 5432 %>
|
||||||
|
database: <%= ENV['POSTGRES_DB'] %>
|
||||||
|
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
|
@ -1,27 +0,0 @@
|
|||||||
production:
|
|
||||||
adapter: postgresql
|
|
||||||
database: discourse_prod
|
|
||||||
# username: discourse_prod # if using username/password auth
|
|
||||||
# password: itisagooddaytovi # if using username/password auth
|
|
||||||
# host: dbhost # if not localhost
|
|
||||||
pool: 5 # size of DB connection pool *per process*
|
|
||||||
timeout: 5000
|
|
||||||
# db_id: 0 # database ID if hosting multiple sites
|
|
||||||
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`
|
|
||||||
- <%= ENV["DISCOURSE_HOSTNAME"] || "production.localhost" %> # Update this to be the domain of your production site
|
|
||||||
|
|
||||||
test:
|
|
||||||
adapter: postgresql
|
|
||||||
database: discourse_test
|
|
||||||
# username: discourse_test
|
|
||||||
# password: 123123123123
|
|
||||||
min_messages: warning
|
|
||||||
host: localhost
|
|
||||||
pool: 5
|
|
||||||
timeout: 5000
|
|
||||||
host_names:
|
|
||||||
- test.localhost
|
|
@ -3,7 +3,6 @@ Discourse::Application.configure do
|
|||||||
|
|
||||||
# Code is not reloaded between requests
|
# Code is not reloaded between requests
|
||||||
config.cache_classes = true
|
config.cache_classes = true
|
||||||
|
|
||||||
config.eager_load = true
|
config.eager_load = true
|
||||||
|
|
||||||
# Full error reports are disabled and caching is turned on
|
# Full error reports are disabled and caching is turned on
|
||||||
@ -13,12 +12,12 @@ Discourse::Application.configure do
|
|||||||
# Disable Rails's static asset server (Apache or nginx will already do this)
|
# Disable Rails's static asset server (Apache or nginx will already do this)
|
||||||
config.serve_static_assets = false
|
config.serve_static_assets = false
|
||||||
|
|
||||||
# Compress JavaScripts and CSS
|
if rails4?
|
||||||
config.assets.compress = true
|
config.assets.js_compressor = :uglifier
|
||||||
|
config.assets.css_compressor = :sass
|
||||||
# rails 4
|
else
|
||||||
config.assets.js_compressor = :uglifier
|
config.assets.compress = true
|
||||||
config.assets.css_compressor = :sass
|
end
|
||||||
|
|
||||||
# stuff should be pre-compiled
|
# stuff should be pre-compiled
|
||||||
config.assets.compile = false
|
config.assets.compile = false
|
||||||
@ -33,30 +32,19 @@ Discourse::Application.configure do
|
|||||||
# the I18n.default_locale when a translation can not be found)
|
# the I18n.default_locale when a translation can not be found)
|
||||||
config.i18n.fallbacks = true
|
config.i18n.fallbacks = true
|
||||||
|
|
||||||
|
# specify your smtp url using the SMTP_URL env var eg:
|
||||||
# you may use other configuration here for mail eg: sendgrid
|
# SMTP_URL=smtp://user:password@myhost.com
|
||||||
|
|
||||||
# config.action_mailer.delivery_method = :smtp
|
|
||||||
# config.action_mailer.smtp_settings = {
|
|
||||||
# :address => "smtp.sendgrid.net",
|
|
||||||
# :port => 587,
|
|
||||||
# :domain => 'YOUR DOMAIN',
|
|
||||||
# :user_name => 'YOUR_USER',
|
|
||||||
# :password => 'YOUR_PASSWORD',
|
|
||||||
# :authentication => 'plain',
|
|
||||||
# :enable_starttls_auto => true }
|
|
||||||
|
|
||||||
if ENV.key?('SMTP_URL')
|
if ENV.key?('SMTP_URL')
|
||||||
config.action_mailer.smtp_settings = begin
|
config.action_mailer.smtp_settings = begin
|
||||||
uri = URI.parse(ENV['SMTP_URL'])
|
uri = URI.parse(ENV['SMTP_URL'])
|
||||||
params = {
|
params = {
|
||||||
:address => uri.host,
|
:address => uri.host,
|
||||||
:port => uri.port,
|
:port => uri.port || 25,
|
||||||
:domain => (uri.path || "").split("/")[1],
|
:domain => (uri.path || "").split("/")[1],
|
||||||
:user_name => uri.user,
|
:user_name => uri.user,
|
||||||
:password => uri.password,
|
:password => uri.password,
|
||||||
:authentication => 'plain',
|
:authentication => 'plain',
|
||||||
:enable_starttls_auto => true
|
:enable_starttls_auto => !ENV['SMTP_DISABLE_TLS']
|
||||||
}
|
}
|
||||||
CGI.parse(uri.query || "").each {|k,v| params[k.to_sym] = v.first}
|
CGI.parse(uri.query || "").each {|k,v| params[k.to_sym] = v.first}
|
||||||
params
|
params
|
||||||
@ -75,14 +63,7 @@ Discourse::Application.configure do
|
|||||||
config.handlebars.precompile = true
|
config.handlebars.precompile = true
|
||||||
|
|
||||||
# allows admins to use mini profiler
|
# allows admins to use mini profiler
|
||||||
config.enable_mini_profiler = true
|
config.enable_mini_profiler = !ENV["DISABLE_MINI_PROFILER"]
|
||||||
|
|
||||||
# allows Cross-origin resource sharing (CORS) for API access in JavaScript (default to false for security).
|
|
||||||
# See the initializer and https://github.com/cyu/rack-cors for configuration documentation.
|
|
||||||
#
|
|
||||||
# config.enable_rack_cors = false
|
|
||||||
# config.rack_cors_origins = ['*']
|
|
||||||
# config.rack_cors_resource = ['*', { :headers => :any, :methods => [:get, :post, :options] }]
|
|
||||||
|
|
||||||
# Discourse strongly recommend you use a CDN.
|
# Discourse strongly recommend you use a CDN.
|
||||||
# For origin pull cdns all you need to do is register an account and configure
|
# For origin pull cdns all you need to do is register an account and configure
|
Reference in New Issue
Block a user