Skip to content

Commit

Permalink
don't init rails performance during asset compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
Floppy committed Nov 25, 2024
1 parent 8439bef commit 9c11b2c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion config/initializers/rails_performance.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions docker/build.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 9c11b2c

Please sign in to comment.