Skip to content

Commit

Permalink
make iiif_print and s3 backed valkyrie storage play nicely together
Browse files Browse the repository at this point in the history
  • Loading branch information
orangewolf committed Nov 7, 2024
1 parent fcc47f6 commit 40b16a8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
14 changes: 13 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ GIT
specs:
hyku_knapsack (0.0.1)
rails (>= 5.2.0)
sentry-rails
sentry-ruby
sentry-sidekiq

GIT
remote: https://github.com/samvera-labs/hyrax-doi.git
Expand Down Expand Up @@ -194,7 +197,7 @@ GIT

GIT
remote: https://github.com/scientist-softserv/iiif_print.git
revision: 9c4783a8301c645b04f062a3e4ca4d3e8cdefc33
revision: a1905e2f5ce9598c4a743eedeaa7a7ee54cb4ce4
branch: main
specs:
iiif_print (3.0.1)
Expand Down Expand Up @@ -1280,6 +1283,15 @@ GEM
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
sentry-rails (5.21.0)
railties (>= 5.0)
sentry-ruby (~> 5.21.0)
sentry-ruby (5.21.0)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
sentry-sidekiq (5.21.0)
sentry-ruby (~> 5.21.0)
sidekiq (>= 3.0)
shacl (0.3.0)
json-ld (~> 3.2)
rdf (~> 3.2, >= 3.2.8)
Expand Down
10 changes: 5 additions & 5 deletions config/initializers/wings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
Valkyrie.config.metadata_adapter = :freyja
Hyrax.config.query_index_from_valkyrie = true
Hyrax.config.index_adapter = :solr_index
Valkyrie::StorageAdapter.register(
Valkyrie::Storage::Disk.new(base_path: Rails.root.join("storage", "files"),
file_mover: FileUtils.method(:cp)),
:disk
)

if ActiveModel::Type::Boolean.new.cast(ENV.fetch("REPOSITORY_S3_STORAGE", false))
shrine_s3_options = {
Expand All @@ -53,11 +58,6 @@

Valkyrie.config.storage_adapter = :repository_s3
else
Valkyrie::StorageAdapter.register(
Valkyrie::Storage::Disk.new(base_path: Rails.root.join("storage", "files"),
file_mover: FileUtils.method(:cp)),
:disk
)
Valkyrie.config.storage_adapter = :disk
end
Valkyrie.config.indexing_adapter = :solr_index
Expand Down

0 comments on commit 40b16a8

Please sign in to comment.