File tree Expand file tree Collapse file tree 4 files changed +37
-6
lines changed
app/views/active_storage/blobs Expand file tree Collapse file tree 4 files changed +37
-6
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ WORKDIR /rails
1616
1717# Install base packages
1818RUN apt-get update -qq && \
19- apt-get install --no-install-recommends -y curl wget libjemalloc2 && \
19+ apt-get install --no-install-recommends -y curl wget libjemalloc2 libvips sqlite3 && \
2020 rm -rf /var/lib/apt/lists /var/cache/apt/archives
2121
2222# Set production environment
@@ -36,14 +36,14 @@ RUN apt-get update -qq && \
3636# Install application gems
3737COPY Gemfile Gemfile.lock ./
3838RUN bundle install --jobs=4 --retry=3 && \
39- rm -rf ~/.bundle/ "${BUNDLE_PATH}" /ruby/*/cache "${BUNDLE_PATH}" /ruby/*/bundler/gems/*/.git
40- # bundle exec bootsnap precompile --gemfile
39+ rm -rf ~/.bundle/ "${BUNDLE_PATH}" /ruby/*/cache "${BUNDLE_PATH}" /ruby/*/bundler/gems/*/.git && \
40+ bundle exec bootsnap precompile --gemfile
4141
4242# Copy application code
4343COPY . .
4444
4545# Precompile bootsnap code for faster boot times
46- # RUN bundle exec bootsnap precompile app/ lib/
46+ RUN bundle exec bootsnap precompile app/ lib/
4747
4848# Precompiling assets for production without requiring secret RAILS_MASTER_KEY
4949RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ gem "rails", "~> 8.0.3"
55# The modern asset pipeline for Rails [https://github.com/rails/propshaft]
66gem "propshaft"
77# Use sqlite3 as the database for Active Record
8- # gem "sqlite3", ">= 2.1"
8+ gem "sqlite3" , ">= 2.1"
99# Use the Puma web server [https://github.com/puma/puma]
1010gem "puma" , ">= 5.0"
1111# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
@@ -41,7 +41,7 @@ gem "kamal", require: false
4141gem "thruster" , require : false
4242
4343# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
44- # gem "image_processing", "~> 1.2"
44+ gem "image_processing" , "~> 1.2"
4545
4646gem "aws-sdk-s3" , require : false
4747
Original file line number Diff line number Diff line change 225225 railties (>= 7.0.0 )
226226 i18n (1.14.7 )
227227 concurrent-ruby (~> 1.0 )
228+ image_processing (1.14.0 )
229+ mini_magick (>= 4.9.5 , < 6 )
230+ ruby-vips (>= 2.0.17 , < 3 )
228231 importmap-rails (2.2.2 )
229232 actionpack (>= 6.0.0 )
230233 activesupport (>= 6.0.0 )
276279 marksmith (0.4.7 )
277280 activesupport
278281 matrix (0.4.3 )
282+ mini_magick (5.3.0 )
283+ logger
279284 mini_mime (1.1.5 )
280285 minitest (5.26.0 )
281286 mission_control-jobs (1.1.0 )
461466 rubocop-rails (>= 2.30 )
462467 ruby-progressbar (1.13.0 )
463468 ruby-rc4 (0.1.5 )
469+ ruby-vips (2.2.4 )
470+ ffi (~> 1.12 )
471+ logger
464472 rubyzip (3.2.0 )
465473 safely_block (0.5.0 )
466474 sanitize (7.0.0 )
506514 fugit (~> 1.11 )
507515 railties (>= 7.1 )
508516 thor (>= 1.3.1 )
517+ sqlite3 (2.7.4-aarch64-linux-gnu )
518+ sqlite3 (2.7.4-aarch64-linux-musl )
519+ sqlite3 (2.7.4-arm-linux-gnu )
520+ sqlite3 (2.7.4-arm-linux-musl )
521+ sqlite3 (2.7.4-arm64-darwin )
522+ sqlite3 (2.7.4-x86_64-linux-gnu )
523+ sqlite3 (2.7.4-x86_64-linux-musl )
509524 sshkit (1.24.0 )
510525 base64
511526 logger
@@ -594,6 +609,7 @@ DEPENDENCIES
594609 flipper-ui
595610 geocoder
596611 hotwire-livereload (~> 2.1 )
612+ image_processing (~> 1.2 )
597613 importmap-rails
598614 inline_svg
599615 jbuilder
@@ -624,6 +640,7 @@ DEPENDENCIES
624640 solid_cable
625641 solid_cache
626642 solid_queue
643+ sqlite3 (>= 2.1 )
627644 stimulus-rails
628645 tailwind_merge (~> 1.3 )
629646 tailwindcss-rails (~> 4.4 )
Original file line number Diff line number Diff line change 1+ < figure class ="attachment attachment--<%= blob . representable? ? "preview" : "file" %> attachment-- <%= blob . filename . extension %> ">
2+ <% if blob . representable? %>
3+ <%= image_tag blob . representation ( resize_to_limit : local_assigns [ :in_gallery ] ? [ 800 , 600 ] : [ 1024 , 768 ] ) %>
4+ <% end %>
5+
6+ < figcaption class ="attachment__caption ">
7+ <% if caption = blob . try ( :caption ) %>
8+ <%= caption %>
9+ <% else %>
10+ < span class ="attachment__name "> <%= blob . filename %> </ span >
11+ < span class ="attachment__size "> <%= number_to_human_size blob . byte_size %> </ span >
12+ <% end %>
13+ </ figcaption >
14+ </ figure >
You can’t perform that action at this time.
0 commit comments