mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 02:19:27 +08:00
PERF: add FORCE_BOOTSNAP env var
Bootsnap is designed to work in production per: https://github.com/Shopify/bootsnap Over the years we have seen very few issues with it, none of which were corruption. This allows us to enable bootsnap in production Having bootsnap enabled means that we can speed up deploys by about 5 seconds per server. It also means a lot less waiting for various production rake tasks and so on.
This commit is contained in:
parent
04a291ceea
commit
cbaad631a4
|
@ -12,7 +12,7 @@ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
|
|||
|
||||
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
|
||||
|
||||
if ENV['RAILS_ENV'] != 'production' && ENV['RAILS_ENV'] != 'profile'
|
||||
if (ENV['FORCE_BOOTSNAP'] == '1') || (ENV['RAILS_ENV'] != 'production' && ENV['RAILS_ENV'] != 'profile')
|
||||
begin
|
||||
require 'bootsnap'
|
||||
rescue LoadError
|
||||
|
|
Loading…
Reference in New Issue
Block a user