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 \
54
54
SECRET_KEY_BASE=dummy \
55
55
RAILS_MASTER_KEY=dummy \
56
56
DB_ADAPTER=nulldb \
57
+ ASSETS_PRECOMPILE=true \
58
+ STORAGE_PROVIDER=local \
57
59
bundle exec rails assets:precompile
58
60
59
61
RUN 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 \
97
99
98
100
99
101
ENTRYPOINT ["/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'
34
34
35
35
group :production do
36
36
# 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
38
38
end
39
39
40
40
group :development do
Original file line number Diff line number Diff line change @@ -455,15 +455,15 @@ GEM
455
455
activesupport (>= 6.1 )
456
456
sprockets (>= 3.0.0 )
457
457
stringio (3.1.5 )
458
+ terser (1.2.5 )
459
+ execjs (>= 0.3.0 , < 3 )
458
460
thor (1.3.2 )
459
461
tilt (2.5.0 )
460
462
timeout (0.4.3 )
461
463
ttfunk (1.8.0 )
462
464
bigdecimal (~> 3.1 )
463
465
tzinfo (2.0.6 )
464
466
concurrent-ruby (~> 1.0 )
465
- uglifier (4.2.1 )
466
- execjs (>= 0.3.0 , < 3 )
467
467
unicode-display_width (3.1.4 )
468
468
unicode-emoji (~> 4.0 , >= 4.0.4 )
469
469
unicode-emoji (4.0.4 )
@@ -534,7 +534,7 @@ DEPENDENCIES
534
534
sidekiq-cron (~> 1.12.0 )
535
535
simple_form (~> 5.0.2 )
536
536
simplecov (~> 0.22 )
537
- uglifier (~> 4.2.0 )
537
+ terser (~> 1.2 )
538
538
web-console (~> 4.2 )
539
539
540
540
BUNDLED WITH
Original file line number Diff line number Diff line change 1
1
require "active_support/core_ext/integer/time"
2
2
3
3
# 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 "
5
5
6
6
Rails . application . configure do
7
7
# Settings specified here will take precedence over those in config/application.rb.
28
28
config . public_file_server . enabled = ENV [ "RAILS_SERVE_STATIC_FILES" ] . present?
29
29
30
30
# 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
33
33
config . assets . css_compressor = :sass
34
34
end
35
35
You can’t perform that action at this time.
0 commit comments