lib/generators/templates/Dockerfile.erb in dockerfile-rails-0.4.4 vs lib/generators/templates/Dockerfile.erb in dockerfile-rails-0.4.5

- old
+ new

@@ -61,11 +61,11 @@ <% if options.cache? -%> RUN --mount=type=cache,id=bld-gem-cache,sharing=locked,target=/srv/vendor \ bundle config set app_config .bundle && \ bundle config set path /srv/vendor && \ bundle _${BUNDLER_VERSION}_ install && \ -<% if depend_on_bootsnap? -%> && \ +<% if depend_on_bootsnap? -%> bundle exec bootsnap precompile --gemfile && \ <% end -%> bundle clean && \ mkdir -p vendor && \ bundle config set path vendor && \ @@ -93,10 +93,10 @@ <% unless binfile_fixups.empty? -%> # Adjust binfiles to be executable on Linux <%= "RUN " + binfile_fixups.join(" && \\\n ") %> <% end -%> -<% unless api_only? -%> +<% if Dir.exist?('assets') and !api_only? -%> # Precompiling assets for production without requiring secret RAILS_MASTER_KEY RUN SECRET_KEY_BASE<%= Rails::VERSION::MAJOR<7 || Rails::VERSION::STRING.start_with?('7.0') ? '=DUMMY' : '_DUMMY=1' %> ./bin/rails assets:precompile <% end -%>