Commit 4e6bc209a756de5dac689057f468339452b6b236
Committed by
Rafael Reggiani Manzo
1 parent
c291d6dc
Revert "Rename colab environment to production"
This reverts commit 91939dd228452119e77528e0c556052924eed464. Signed off by: Rafael Reggiani Manzo <rr.manzo@gmail.com>
Showing
3 changed files
with
141 additions
and
141 deletions
Show diff stats
@@ -0,0 +1,53 @@ | @@ -0,0 +1,53 @@ | ||
1 | +Rails.application.configure do | ||
2 | + # Settings specified here will take precedence over those in config/application.rb. | ||
3 | + | ||
4 | + # In the development environment your application's code is reloaded on | ||
5 | + # every request. This slows down response time but is perfect for development | ||
6 | + # since you don't have to restart the web server when you make code changes. | ||
7 | + config.cache_classes = false | ||
8 | + | ||
9 | + # Do not eager load code on boot. | ||
10 | + config.eager_load = false | ||
11 | + | ||
12 | + # Show full error reports and disable caching. | ||
13 | + config.consider_all_requests_local = true | ||
14 | + config.action_controller.perform_caching = false | ||
15 | + | ||
16 | + # Don't care if the mailer can't send. | ||
17 | + config.action_mailer.raise_delivery_errors = false | ||
18 | + | ||
19 | + # Print deprecation notices to the Rails logger. | ||
20 | + config.active_support.deprecation = :log | ||
21 | + | ||
22 | + # Raise an error on page load if there are pending migrations. | ||
23 | + config.active_record.migration_error = :page_load | ||
24 | + | ||
25 | + # Debug mode disables concatenation and preprocessing of assets. | ||
26 | + # This option may cause significant delays in view rendering with a large | ||
27 | + # number of complex assets. | ||
28 | + config.assets.debug = true | ||
29 | + | ||
30 | + # Asset digests allow you to set far-future HTTP expiration dates on all assets, | ||
31 | + # yet still be able to expire them through the digest params. | ||
32 | + config.assets.digest = true | ||
33 | + | ||
34 | + #Root URL for ActionMailer | ||
35 | + config.action_mailer.default_url_options = { :host => 'localhost:3000' } | ||
36 | + | ||
37 | + # Enables page caching | ||
38 | + config.action_controller.perform_caching = true | ||
39 | + | ||
40 | + # Adds additional error checking when serving assets at runtime. | ||
41 | + # Checks for improperly declared sprockets dependencies. | ||
42 | + # Raises helpful error messages. | ||
43 | + config.assets.raise_runtime_errors = true | ||
44 | + | ||
45 | + # Raises error for missing translations | ||
46 | + # config.action_view.raise_on_missing_translations = true | ||
47 | + | ||
48 | + # Kalibro URL | ||
49 | + KalibroClient.configure_with(Rails.root.join('config', 'kalibro.yml')) | ||
50 | + | ||
51 | + # Responds on a subdirectory | ||
52 | + config.relative_url_root = '/mezuro' | ||
53 | +end |
config/environments/production.rb
1 | Rails.application.configure do | 1 | Rails.application.configure do |
2 | # Settings specified here will take precedence over those in config/application.rb. | 2 | # Settings specified here will take precedence over those in config/application.rb. |
3 | 3 | ||
4 | - # In the development environment your application's code is reloaded on | ||
5 | - # every request. This slows down response time but is perfect for development | ||
6 | - # since you don't have to restart the web server when you make code changes. | ||
7 | - config.cache_classes = false | 4 | + # Code is not reloaded between requests. |
5 | + config.cache_classes = true | ||
8 | 6 | ||
9 | - # Do not eager load code on boot. | ||
10 | - config.eager_load = false | 7 | + # Eager load code on boot. This eager loads most of Rails and |
8 | + # your application in memory, allowing both threaded web servers | ||
9 | + # and those relying on copy on write to perform better. | ||
10 | + # Rake tasks automatically ignore this option for performance. | ||
11 | + config.eager_load = true | ||
11 | 12 | ||
12 | - # Show full error reports and disable caching. | ||
13 | - config.consider_all_requests_local = true | ||
14 | - config.action_controller.perform_caching = false | 13 | + # Full error reports are disabled and caching is turned on. |
14 | + config.consider_all_requests_local = false | ||
15 | + config.action_controller.perform_caching = true | ||
15 | 16 | ||
16 | - # Don't care if the mailer can't send. | ||
17 | - config.action_mailer.raise_delivery_errors = false | 17 | + # Enable Rack::Cache to put a simple HTTP cache in front of your application |
18 | + # Add `rack-cache` to your Gemfile before enabling this. | ||
19 | + # For large-scale production use, consider using a caching reverse proxy like | ||
20 | + # NGINX, varnish or squid. | ||
18 | 21 | ||
19 | - # Print deprecation notices to the Rails logger. | ||
20 | - config.active_support.deprecation = :log | 22 | + # Disable serving static files from the `/public` folder by default since |
23 | + # Apache or NGINX already handles this. | ||
24 | + config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present? | ||
21 | 25 | ||
22 | - # Raise an error on page load if there are pending migrations. | ||
23 | - config.active_record.migration_error = :page_load | 26 | + # Compress JavaScripts and CSS. |
27 | + config.assets.js_compressor = :uglifier | ||
28 | + # config.assets.css_compressor = :sass | ||
24 | 29 | ||
25 | - # Debug mode disables concatenation and preprocessing of assets. | ||
26 | - # This option may cause significant delays in view rendering with a large | ||
27 | - # number of complex assets. | ||
28 | - config.assets.debug = true | 30 | + # Do not fallback to assets pipeline if a precompiled asset is missed. |
31 | + config.assets.compile = false | ||
29 | 32 | ||
30 | - # Asset digests allow you to set far-future HTTP expiration dates on all assets, | ||
31 | - # yet still be able to expire them through the digest params. | 33 | + # Generate digests for assets URLs. |
32 | config.assets.digest = true | 34 | config.assets.digest = true |
33 | 35 | ||
34 | - #Root URL for ActionMailer | ||
35 | - config.action_mailer.default_url_options = { :host => 'localhost:3000' } | 36 | + # Version of your assets, change this if you want to expire all your assets. |
37 | + config.assets.version = '1.0' | ||
36 | 38 | ||
37 | - # Enables page caching | ||
38 | - config.action_controller.perform_caching = true | 39 | + # Specifies the header that your server uses for sending files. |
40 | + # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache | ||
41 | + config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX | ||
39 | config.cache_store = :mem_cache_store, "localhost", {expires_in: 1.day} | 42 | config.cache_store = :mem_cache_store, "localhost", {expires_in: 1.day} |
40 | 43 | ||
41 | - # Adds additional error checking when serving assets at runtime. | ||
42 | - # Checks for improperly declared sprockets dependencies. | ||
43 | - # Raises helpful error messages. | ||
44 | - config.assets.raise_runtime_errors = true | 44 | + # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. |
45 | + # config.force_ssl = true | ||
46 | + | ||
47 | + # Use the lowest log level to ensure availability of diagnostic information | ||
48 | + # when problems arise. | ||
49 | + config.log_level = :debug | ||
50 | + | ||
51 | + # Prepend all log lines with the following tags. | ||
52 | + # config.log_tags = [ :subdomain, :uuid ] | ||
53 | + | ||
54 | + # Use a different logger for distributed setups. | ||
55 | + # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) | ||
56 | + | ||
57 | + # Use a different cache store in production. | ||
58 | + config.cache_store = :mem_cache_store, "10.2.2.21", {expires_in: 1.day} | ||
59 | + | ||
60 | + # Enable serving of images, stylesheets, and JavaScripts from an asset server. | ||
61 | + # config.action_controller.asset_host = 'http://assets.example.com' | ||
45 | 62 | ||
46 | - # Raises error for missing translations | ||
47 | - # config.action_view.raise_on_missing_translations = true | 63 | + # Ignore bad email addresses and do not raise email delivery errors. |
64 | + # Set this to true and configure the email server for immediate delivery to raise delivery errors. | ||
65 | + # config.action_mailer.raise_delivery_errors = false | ||
66 | + | ||
67 | + # Enable locale fallbacks for I18n (makes lookups for any locale fall back to | ||
68 | + # the I18n.default_locale when a translation cannot be found). | ||
69 | + config.i18n.fallbacks = true | ||
70 | + | ||
71 | + # Send deprecation notices to registered listeners. | ||
72 | + config.active_support.deprecation = :notify | ||
73 | + | ||
74 | + # Use default logging formatter so that PID and timestamp are not suppressed. | ||
75 | + config.log_formatter = ::Logger::Formatter.new | ||
76 | + | ||
77 | + # Root URL for ActionMailer | ||
78 | + config.action_mailer.default_url_options = { :host => 'mezuro.org' } | ||
79 | + | ||
80 | + # Do not dump schema after migrations. | ||
81 | + config.active_record.dump_schema_after_migration = false | ||
48 | 82 | ||
49 | # Kalibro URL | 83 | # Kalibro URL |
50 | KalibroClient.configure_with(Rails.root.join('config', 'kalibro.yml')) | 84 | KalibroClient.configure_with(Rails.root.join('config', 'kalibro.yml')) |
51 | 85 | ||
52 | - # Responds on a subdirectory | ||
53 | - config.relative_url_root = '/mezuro' | 86 | + # ActionMailer SMTP |
87 | + config.action_mailer.delivery_method = :smtp | ||
88 | + config.action_mailer.smtp_settings = { | ||
89 | + address: 'smtp.gmail.com', | ||
90 | + port: 587, | ||
91 | + domain: 'mezuro.org', | ||
92 | + user_name: ENV['SMTP_USERNAME'], # Configure these as a environment vars on the production server | ||
93 | + password: ENV['SMTP_PASSWORD'], | ||
94 | + authentication: 'plain', | ||
95 | + enable_starttls_auto: true } | ||
96 | + | ||
97 | + # Exception Notification | ||
98 | + config.middleware.use ExceptionNotification::Rack, | ||
99 | + :ignore_crawlers => %w{Googlebot bingbot SeznamBot Baiduspider AhrefsBot TurnitinBot Mail.RU_Bot Slurp DotBot}, | ||
100 | + :email => { | ||
101 | + :email_prefix => "[Prezento Error] ", | ||
102 | + :sender_address => %{"mezurometrics" <mezurometrics@gmail.com>}, | ||
103 | + :exception_recipients => %w{mezuro-core@lists.ime.usp.br} | ||
104 | + } | ||
105 | + | ||
106 | + # Google Analytics | ||
107 | + GA.tracker = ENV['GA_TRACKER'] | ||
108 | + GA.script_source = :doubleclick | ||
54 | end | 109 | end |
config/environments/sample_production.rb
@@ -1,108 +0,0 @@ | @@ -1,108 +0,0 @@ | ||
1 | -Rails.application.configure do | ||
2 | - # Settings specified here will take precedence over those in config/application.rb. | ||
3 | - | ||
4 | - # Code is not reloaded between requests. | ||
5 | - config.cache_classes = true | ||
6 | - | ||
7 | - # Eager load code on boot. This eager loads most of Rails and | ||
8 | - # your application in memory, allowing both threaded web servers | ||
9 | - # and those relying on copy on write to perform better. | ||
10 | - # Rake tasks automatically ignore this option for performance. | ||
11 | - config.eager_load = true | ||
12 | - | ||
13 | - # Full error reports are disabled and caching is turned on. | ||
14 | - config.consider_all_requests_local = false | ||
15 | - config.action_controller.perform_caching = true | ||
16 | - | ||
17 | - # Enable Rack::Cache to put a simple HTTP cache in front of your application | ||
18 | - # Add `rack-cache` to your Gemfile before enabling this. | ||
19 | - # For large-scale production use, consider using a caching reverse proxy like | ||
20 | - # NGINX, varnish or squid. | ||
21 | - | ||
22 | - # Disable serving static files from the `/public` folder by default since | ||
23 | - # Apache or NGINX already handles this. | ||
24 | - config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present? | ||
25 | - | ||
26 | - # Compress JavaScripts and CSS. | ||
27 | - config.assets.js_compressor = :uglifier | ||
28 | - # config.assets.css_compressor = :sass | ||
29 | - | ||
30 | - # Do not fallback to assets pipeline if a precompiled asset is missed. | ||
31 | - config.assets.compile = false | ||
32 | - | ||
33 | - # Generate digests for assets URLs. | ||
34 | - config.assets.digest = true | ||
35 | - | ||
36 | - # Version of your assets, change this if you want to expire all your assets. | ||
37 | - config.assets.version = '1.0' | ||
38 | - | ||
39 | - # Specifies the header that your server uses for sending files. | ||
40 | - # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache | ||
41 | - config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX | ||
42 | - | ||
43 | - # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. | ||
44 | - # config.force_ssl = true | ||
45 | - | ||
46 | - # Use the lowest log level to ensure availability of diagnostic information | ||
47 | - # when problems arise. | ||
48 | - config.log_level = :debug | ||
49 | - | ||
50 | - # Prepend all log lines with the following tags. | ||
51 | - # config.log_tags = [ :subdomain, :uuid ] | ||
52 | - | ||
53 | - # Use a different logger for distributed setups. | ||
54 | - # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) | ||
55 | - | ||
56 | - # Use a different cache store in production. | ||
57 | - config.cache_store = :mem_cache_store, "10.2.2.21", {expires_in: 1.day} | ||
58 | - | ||
59 | - # Enable serving of images, stylesheets, and JavaScripts from an asset server. | ||
60 | - # config.action_controller.asset_host = 'http://assets.example.com' | ||
61 | - | ||
62 | - # Ignore bad email addresses and do not raise email delivery errors. | ||
63 | - # Set this to true and configure the email server for immediate delivery to raise delivery errors. | ||
64 | - # config.action_mailer.raise_delivery_errors = false | ||
65 | - | ||
66 | - # Enable locale fallbacks for I18n (makes lookups for any locale fall back to | ||
67 | - # the I18n.default_locale when a translation cannot be found). | ||
68 | - config.i18n.fallbacks = true | ||
69 | - | ||
70 | - # Send deprecation notices to registered listeners. | ||
71 | - config.active_support.deprecation = :notify | ||
72 | - | ||
73 | - # Use default logging formatter so that PID and timestamp are not suppressed. | ||
74 | - config.log_formatter = ::Logger::Formatter.new | ||
75 | - | ||
76 | - # Root URL for ActionMailer | ||
77 | - config.action_mailer.default_url_options = { :host => 'mezuro.org' } | ||
78 | - | ||
79 | - # Do not dump schema after migrations. | ||
80 | - config.active_record.dump_schema_after_migration = false | ||
81 | - | ||
82 | - # Kalibro URL | ||
83 | - KalibroClient.configure_with(Rails.root.join('config', 'kalibro.yml')) | ||
84 | - | ||
85 | - # ActionMailer SMTP | ||
86 | - config.action_mailer.delivery_method = :smtp | ||
87 | - config.action_mailer.smtp_settings = { | ||
88 | - address: 'smtp.gmail.com', | ||
89 | - port: 587, | ||
90 | - domain: 'mezuro.org', | ||
91 | - user_name: ENV['SMTP_USERNAME'], # Configure these as a environment vars on the production server | ||
92 | - password: ENV['SMTP_PASSWORD'], | ||
93 | - authentication: 'plain', | ||
94 | - enable_starttls_auto: true } | ||
95 | - | ||
96 | - # Exception Notification | ||
97 | - config.middleware.use ExceptionNotification::Rack, | ||
98 | - :ignore_crawlers => %w{Googlebot bingbot SeznamBot Baiduspider AhrefsBot TurnitinBot Mail.RU_Bot Slurp DotBot}, | ||
99 | - :email => { | ||
100 | - :email_prefix => "[Prezento Error] ", | ||
101 | - :sender_address => %{"mezurometrics" <mezurometrics@gmail.com>}, | ||
102 | - :exception_recipients => %w{mezuro-core@lists.ime.usp.br} | ||
103 | - } | ||
104 | - | ||
105 | - # Google Analytics | ||
106 | - GA.tracker = ENV['GA_TRACKER'] | ||
107 | - GA.script_source = :doubleclick | ||
108 | -end |