diff --git a/config/initializers/rails_performance.rb b/config/initializers/rails_performance.rb index c1200d576..2ecb997b8 100644 --- a/config/initializers/rails_performance.rb +++ b/config/initializers/rails_performance.rb @@ -1,4 +1,4 @@ -if defined?(RailsPerformance) && !Rails.env.test? +if defined?(RailsPerformance) && !Rails.env.test? && ENV["RAILS_ASSETS_PRECOMPILE"].blank? RailsPerformance.setup do |config| config.redis = Redis::Namespace.new("#{Rails.env}-rails-performance", redis: Redis.new) config.duration = 4.hours diff --git a/docker/build.dockerfile b/docker/build.dockerfile index baeb80f5c..a6d0a1efa 100644 --- a/docker/build.dockerfile +++ b/docker/build.dockerfile @@ -27,4 +27,5 @@ RUN \ DATABASE_URL="nulldb://user:pass@localhost/db" \ SECRET_KEY_BASE="placeholder" \ RACK_ENV="production" \ + RAILS_ASSETS_PRECOMPILE=1 \ bundle exec rake assets:precompile