File tree Expand file tree Collapse file tree 4 files changed +10
-8
lines changed Expand file tree Collapse file tree 4 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,8 @@ RUN RAILS_ENV=production \
5454 SECRET_KEY_BASE=dummy \
5555 RAILS_MASTER_KEY=dummy \
5656 DB_ADAPTER=nulldb \
57+ ASSETS_PRECOMPILE=true \
58+ STORAGE_PROVIDER=local \
5759 bundle exec rails assets:precompile
5860
5961RUN mv config/credentials.yml.enc.bak config/credentials.yml.enc 2>/dev/null || true
@@ -97,4 +99,4 @@ HEALTHCHECK --interval=1m --timeout=5s --start-period=10s \
9799
98100
99101ENTRYPOINT ["/app/entrypoint.sh" ]
100- CMD ["/usr/bin/supervisord" ]
102+ CMD ["/usr/bin/supervisord" ]
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ gem 'select2-rails', '~> 4.0.13'
3434
3535group :production do
3636 # we are using an ExecJS runtime only on the precompilation phase
37- gem "uglifier " , "~> 4.2.0 " , require : false
37+ gem "terser " , "~> 1.2 " , require : false
3838end
3939
4040group :development do
Original file line number Diff line number Diff line change @@ -455,15 +455,15 @@ GEM
455455 activesupport (>= 6.1 )
456456 sprockets (>= 3.0.0 )
457457 stringio (3.1.5 )
458+ terser (1.2.5 )
459+ execjs (>= 0.3.0 , < 3 )
458460 thor (1.3.2 )
459461 tilt (2.5.0 )
460462 timeout (0.4.3 )
461463 ttfunk (1.8.0 )
462464 bigdecimal (~> 3.1 )
463465 tzinfo (2.0.6 )
464466 concurrent-ruby (~> 1.0 )
465- uglifier (4.2.1 )
466- execjs (>= 0.3.0 , < 3 )
467467 unicode-display_width (3.1.4 )
468468 unicode-emoji (~> 4.0 , >= 4.0.4 )
469469 unicode-emoji (4.0.4 )
@@ -534,7 +534,7 @@ DEPENDENCIES
534534 sidekiq-cron (~> 1.12.0 )
535535 simple_form (~> 5.0.2 )
536536 simplecov (~> 0.22 )
537- uglifier (~> 4.2.0 )
537+ terser (~> 1.2 )
538538 web-console (~> 4.2 )
539539
540540BUNDLED WITH
Original file line number Diff line number Diff line change 11require "active_support/core_ext/integer/time"
22
33# Uglifier is only used on the precompile phase, so we can require it conditionally
4- require "uglifier " if ENV [ "SECRET_KEY_BASE " ] == "dummy "
4+ require "terser " if ENV [ "ASSETS_PRECOMPILE " ] == "true "
55
66Rails . application . configure do
77 # Settings specified here will take precedence over those in config/application.rb.
2828 config . public_file_server . enabled = ENV [ "RAILS_SERVE_STATIC_FILES" ] . present?
2929
3030 # Compress CSS & JS using preprocessors only on the precompile phase
31- if ENV [ "SECRET_KEY_BASE " ] == "dummy "
32- config . assets . js_compressor = Uglifier . new ( harmony : true )
31+ if ENV [ "ASSETS_PRECOMPILE " ] == "true "
32+ config . assets . js_compressor = Terser . new
3333 config . assets . css_compressor = :sass
3434 end
3535
You can’t perform that action at this time.
0 commit comments