Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Rails.application.configure do
- # Settings specified here will take precedence over those in config/application.rb.
- # Setting up Cloudfront CDN for both http and https
- config.action_controller.asset_host = ->(source, request=nil, *_){
- if request && request.ssl?
- ENV['CLOUDFRONT_ENDPOINT_SECURE']
- else
- ENV['CLOUDFRONT_ENDPOINT']
- end
- }
- # Setting up production host link
- config.action_mailer.default_url_options = { host: 'boiling-beyond-8903.herokuapp.com/'}
- # Mailer outgoing server setup
- config.action_mailer.delivery_method = :smtp
- config.action_mailer.perform_deliveries = true
- config.action_mailer.raise_delivery_errors = false
- config.action_mailer.default :charset => 'utf-8'
- config.action_mailer.delivery_method = :smtp
- config.action_mailer.smtp_settings = {
- :user_name => ENV["SENDGRID_USERNAME"],
- :password => ENV["SENDGRID_PASSWORD"],
- :address => 'smtp.sendgrid.net',
- :domain => ENV["SENDGRID_DOMAIN"],
- :port => '587',
- :authentication => :plain,
- :enable_starttls_auto => true
- }
- # Code is not reloaded between requests.
- config.cache_classes = true
- # Eager load code on boot. This eager loads most of Rails and
- # your application in memory, allowing both threaded web servers
- # and those relying on copy on write to perform better.
- # Rake tasks automatically ignore this option for performance.
- config.eager_load = true
- # Full error reports are disabled and caching is turned on.
- config.consider_all_requests_local = false
- config.action_controller.perform_caching = true
- # Enable Rack::Cache to put a simple HTTP cache in front of your application
- # Add `rack-cache` to your Gemfile before enabling this.
- # For large-scale production use, consider using a caching reverse proxy like
- # NGINX, varnish or squid.
- # config.action_dispatch.rack_cache = true
- #Depend on configuration from initializers
- config.assets.initialize_on_precompile = true
- # Disable serving static files from the `/public` folder by default since
- # Apache or NGINX already handles this.
- config.serve_static_files = true
- # Compress JavaScripts and CSS.
- config.assets.js_compressor = :uglifier
- # config.assets.css_compressor = :sass
- # Do not fallback to assets pipeline if a precompiled asset is missed.
- config.assets.compile = true
- config.assets.enabled = true
- # Asset digests allow you to set far-future HTTP expiration dates on all assets,
- # yet still be able to expire them through the digest params.
- config.assets.digest = true
- #prefix S3 asset files so that they are stored in folder
- config.assets.prefix = "/production/assets"
- # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
- # Specifies the header that your server uses for sending files.
- config.action_dispatch.x_sendfile_header = nil
- config.log_level = :debug
- # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
- # the I18n.default_locale when a translation cannot be found).
- config.i18n.fallbacks = true
- # Send deprecation notices to registered listeners.
- config.active_support.deprecation = :notify
- # Use default logging formatter so that PID and timestamp are not suppressed.
- config.log_formatter = ::Logger::Formatter.new
- # Do not dump schema after migrations.
- config.active_record.dump_schema_after_migration = false
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement