mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05: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:
parent
39a360f6e3
commit
ffffee3ae1
5 changed files with 26 additions and 73 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -23,10 +23,7 @@ public/plugins/*
|
|||
|
||||
/public/assets/*
|
||||
|
||||
config/database.yml
|
||||
config/redis.yml
|
||||
config/discourse.pill
|
||||
config/environments/production.rb
|
||||
|
||||
# Ignore the default SQLite database and db dumps
|
||||
/db/*.sqlite3
|
||||
|
|
|
@ -25,19 +25,7 @@ test:
|
|||
host_names:
|
||||
- test.localhost
|
||||
|
||||
# using the test db, so jenkins can run this config
|
||||
# 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 db is used for benchamarking using the script/bench.rb script
|
||||
profile:
|
||||
adapter: postgresql
|
||||
database: discourse_profile
|
||||
|
@ -47,3 +35,17 @@ profile:
|
|||
timeout: 5000
|
||||
host_names:
|
||||
- "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
|
||||
config.cache_classes = true
|
||||
|
||||
config.eager_load = true
|
||||
|
||||
# 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)
|
||||
config.serve_static_assets = false
|
||||
|
||||
# Compress JavaScripts and CSS
|
||||
config.assets.compress = true
|
||||
|
||||
# rails 4
|
||||
config.assets.js_compressor = :uglifier
|
||||
config.assets.css_compressor = :sass
|
||||
if rails4?
|
||||
config.assets.js_compressor = :uglifier
|
||||
config.assets.css_compressor = :sass
|
||||
else
|
||||
config.assets.compress = true
|
||||
end
|
||||
|
||||
# stuff should be pre-compiled
|
||||
config.assets.compile = false
|
||||
|
@ -33,30 +32,19 @@ Discourse::Application.configure do
|
|||
# the I18n.default_locale when a translation can not be found)
|
||||
config.i18n.fallbacks = true
|
||||
|
||||
|
||||
# you may use other configuration here for mail eg: sendgrid
|
||||
|
||||
# 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 }
|
||||
|
||||
# specify your smtp url using the SMTP_URL env var eg:
|
||||
# SMTP_URL=smtp://user:password@myhost.com
|
||||
if ENV.key?('SMTP_URL')
|
||||
config.action_mailer.smtp_settings = begin
|
||||
uri = URI.parse(ENV['SMTP_URL'])
|
||||
params = {
|
||||
:address => uri.host,
|
||||
:port => uri.port,
|
||||
:port => uri.port || 25,
|
||||
:domain => (uri.path || "").split("/")[1],
|
||||
:user_name => uri.user,
|
||||
:password => uri.password,
|
||||
: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}
|
||||
params
|
||||
|
@ -75,14 +63,7 @@ Discourse::Application.configure do
|
|||
config.handlebars.precompile = true
|
||||
|
||||
# allows admins to use mini profiler
|
||||
config.enable_mini_profiler = true
|
||||
|
||||
# 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] }]
|
||||
config.enable_mini_profiler = !ENV["DISABLE_MINI_PROFILER"]
|
||||
|
||||
# Discourse strongly recommend you use a CDN.
|
||||
# For origin pull cdns all you need to do is register an account and configure
|
Loading…
Reference in a new issue