diff --git a/.env b/.env deleted file mode 100644 index 5cbfdf7..0000000 --- a/.env +++ /dev/null @@ -1,9 +0,0 @@ -CH12N_TOOL=fits_servlet -DATABASE_URL=postgresql://postgres@localhost:5437/hyrax-dev?pool=5 -FCREPO_URL=http://fedoraAdmin:fedoraAdmin@fcrepo:8989/fcrepo/rest -FITS_SERVLET_URL=http://localhost:8085/fits -HYRAX_ACTIVE_JOB_QUEUE=async -REDIS_URL=redis://localhost:6384 -SOLR_URL=http://localhost:8988/solr/hyrax-dev -VALKYRIE_METADATA_ADAPTER=pg_metadata -VALKYRIE_STORAGE_ADAPTER=versioned_disk_storage diff --git a/.gitignore b/.gitignore index f22dd34..d58b341 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ /yarn-error.log yarn-debug.log* .yarn-integrity +.env* diff --git a/Capfile b/Capfile new file mode 100644 index 0000000..37defcd --- /dev/null +++ b/Capfile @@ -0,0 +1,35 @@ +# Load DSL and set up stages +require "capistrano/setup" + +# Include default deployment tasks +require "capistrano/deploy" + +# Load the SCM plugin appropriate to your project: +# +# require "capistrano/scm/hg" +# install_plugin Capistrano::SCM::Hg +# or +# require "capistrano/scm/svn" +# install_plugin Capistrano::SCM::Svn +# or +require "capistrano/scm/git" +install_plugin Capistrano::SCM::Git + +# Include tasks from other gems included in your Gemfile +# +# For documentation on these, see for example: +# +# https://github.com/capistrano/rvm +# https://github.com/capistrano/rbenv +# https://github.com/capistrano/chruby +# https://github.com/capistrano/bundler +# https://github.com/capistrano/rails +# https://github.com/capistrano/passenger +# +require "capistrano/rbenv" +require "capistrano/bundler" +require "capistrano/rails/assets" +require "capistrano/rails/migrations" + +# Load custom tasks from `lib/capistrano/tasks` if you have any defined +Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r } diff --git a/Gemfile b/Gemfile index 9783bc4..124af68 100644 --- a/Gemfile +++ b/Gemfile @@ -3,76 +3,23 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" } ruby '3.2.2' -# Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main' -gem 'rails', '~> 6.1.7', '>= 6.1.7.8' -# Use postgresql as the database for Active Record -gem 'pg', '~> 1.1' -# Use Puma as the app server +gem 'bootsnap', '>= 1.4.4', require: false +gem 'dotenv-rails' +gem 'hyrax', git: 'https://github.com/samvera/hyrax', ref: '9c58751' +gem 'pg', '~> 1.3' gem 'puma', '~> 5.0' -# Use SCSS for stylesheets +gem 'rails', '~> 6.1' gem 'sass-rails', '>= 6' -# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker -gem 'webpacker', '~> 5.0' -# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks gem 'turbolinks', '~> 5' -# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder +gem 'webpacker', '~> 5.0' gem 'jbuilder', '~> 2.7' -# Use Redis adapter to run Action Cable in production -# gem 'redis', '~> 4.0' -# Use Active Model has_secure_password -# gem 'bcrypt', '~> 3.1.7' - -# Use Active Storage variant -# gem 'image_processing', '~> 1.2' - -# Reduces boot times through caching; required in config/boot.rb -gem 'bootsnap', '>= 1.4.4', require: false - -group :development, :test do - # Call 'byebug' anywhere in the code to stop execution and get a debugger console - gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] -end - -group :development do - # Access an interactive console on exception pages or by calling 'console' anywhere in the code. - gem 'web-console', '>= 4.1.0' - # Display performance information such as SQL time and flame graphs for each request in your browser. - # Can be configured to work on production as well see: https://github.com/MiniProfiler/rack-mini-profiler/blob/master/README.md - gem 'rack-mini-profiler', '~> 2.0' - gem 'listen', '~> 3.3' - # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring - gem 'spring' -end - -group :test do - # Adds support for Capybara system testing and selenium driver - gem 'capybara', '>= 3.26' - gem 'selenium-webdriver', '>= 4.0.0.rc1' - # Easy installation and use of web drivers to run system tests with browsers - gem 'webdrivers' -end - -# Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] -gem 'hyrax', '5.0.1' -group :development, :test do - gem 'solr_wrapper', '>= 0.3' -end -gem 'rsolr', '>= 1.0', '< 3' -gem 'bootstrap', '~> 4.0' -gem 'twitter-typeahead-rails', '0.11.1.pre.corejavascript' -gem 'jquery-rails' -gem 'devise' -gem 'devise-guests', '~> 0.8' - -group :development, :test do - gem 'fcrepo_wrapper' - gem 'rspec-rails' -end -gem 'openseadragon', '>= 0.2.0' -gem 'riiif', '~> 2.1' - -group :development, :test do - gem 'dotenv-rails', '~> 2.8' +group :development do + gem "capistrano", "~> 3.18", require: false + gem 'capistrano-bundler', '~> 1.3', require: false + gem "capistrano-rails", "~> 1.6", require: false + gem 'capistrano-rbenv', '~> 2.2', require: false + gem 'ed25519', '>= 1.2', '< 2.0' + gem 'bcrypt_pbkdf', '>= 1.0', '< 2.0' end diff --git a/Gemfile.lock b/Gemfile.lock index 85f01b3..787446f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,66 @@ +GIT + remote: https://github.com/samvera/hyrax + revision: 9c58751ef35421b19cad1b781876077ab3e85591 + ref: 9c58751 + specs: + hyrax (5.0.1) + active-fedora (~> 14.0) + almond-rails (~> 0.1) + awesome_nested_set (~> 3.1) + blacklight (~> 7.29) + blacklight-gallery (~> 4.0) + breadcrumbs_on_rails (~> 3.0) + browse-everything (>= 0.16, < 2.0) + carrierwave (~> 1.0) + clipboard-rails (~> 1.5) + concurrent-ruby (~> 1.0) + connection_pool (~> 2.4) + draper (~> 4.0) + dry-container (~> 0.11) + dry-events (~> 1.0, >= 1.0.1) + dry-logic (~> 1.5) + dry-monads (~> 1.6) + dry-validation (~> 1.10) + faraday (= 2.9.1) + flipflop (~> 2.3) + flot-rails (~> 0.0.6) + font-awesome-rails (~> 4.2) + google-analytics-data (~> 0.6) + hydra-derivatives (~> 3.3) + hydra-editor (~> 6.0) + hydra-file_characterization (~> 1.1) + hydra-head (~> 12.0) + hydra-works (>= 0.16) + iiif_manifest (>= 0.3, < 2.0) + json-schema + legato (~> 0.3) + linkeddata + mailboxer (~> 0.12) + nest (~> 3.1) + noid-rails (~> 3.0) + oauth + oauth2 (~> 1.2) + openseadragon + posix-spawn + qa (~> 5.5, >= 5.5.1) + rails (~> 6.1) + rails_autolink (~> 1.1) + rdf-rdfxml + rdf-vocab (~> 3.0) + redis (~> 4.0) + redis-namespace (~> 1.5) + redlock (>= 0.1.2, < 2.0) + reform (~> 2.3) + reform-rails (~> 0.2.0) + retriable (>= 2.9, < 4.0) + sass-rails (~> 6.0) + select2-rails (~> 3.5) + signet + sprockets (= 3.7.2) + tinymce-rails (~> 5.10) + valkyrie (~> 3.3) + view_component (~> 2.74.1) + GEM remote: https://rubygems.org/ specs: @@ -86,24 +149,24 @@ GEM zeitwerk (~> 2.3) addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) + airbrussh (1.5.2) + sshkit (>= 1.6.1, != 1.7.0) almond-rails (0.3.0) rails (>= 4.2) - autoprefixer-rails (10.4.19.0) - execjs (~> 2) awesome_nested_set (3.7.0) activerecord (>= 4.0.0, < 8.0) aws-eventstream (1.3.0) aws-partitions (1.977.0) - aws-sdk-core (3.206.0) + aws-sdk-core (3.207.0) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.651.0) aws-sigv4 (~> 1.9) jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.91.0) - aws-sdk-core (~> 3, >= 3.205.0) + aws-sdk-kms (1.92.0) + aws-sdk-core (~> 3, >= 3.207.0) aws-sigv4 (~> 1.5) - aws-sdk-s3 (1.163.0) - aws-sdk-core (~> 3, >= 3.205.0) + aws-sdk-s3 (1.164.0) + aws-sdk-core (~> 3, >= 3.207.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.5) aws-sigv4 (1.10.0) @@ -114,9 +177,8 @@ GEM execjs (~> 2.0) base64 (0.2.0) bcp47_spec (0.2.1) - bcrypt (3.1.20) + bcrypt_pbkdf (1.1.1) bigdecimal (3.1.8) - bindex (0.8.1) blacklight (7.38.0) deprecation globalid @@ -136,9 +198,6 @@ GEM rails (>= 6.1, < 8) bootsnap (1.18.4) msgpack (~> 1.2) - bootstrap (4.6.2.1) - autoprefixer-rails (>= 9.1.0) - popper_js (>= 1.16.1, < 2) breadcrumbs_on_rails (3.0.1) browse-everything (1.4.0) addressable (~> 2.5) @@ -151,17 +210,20 @@ GEM signet (~> 0.8) typhoeus builder (3.3.0) - byebug (11.1.3) cancancan (3.6.1) - capybara (3.40.0) - addressable - matrix - mini_mime (>= 0.1.3) - nokogiri (~> 1.11) - rack (>= 1.6.0) - rack-test (>= 0.6.3) - regexp_parser (>= 1.5, < 3.0) - xpath (~> 3.2) + capistrano (3.18.1) + airbrussh (>= 1.0.0) + i18n + rake (>= 10.0.0) + sshkit (>= 1.9.0) + capistrano-bundler (1.6.0) + capistrano (~> 3.1) + capistrano-rails (1.6.3) + capistrano (~> 3.1) + capistrano-bundler (>= 1.1, < 3) + capistrano-rbenv (2.2.0) + capistrano (~> 3.1) + sshkit (~> 1.3) carrierwave (1.3.4) activemodel (>= 4.0.0) activesupport (>= 4.0.0) @@ -176,23 +238,13 @@ GEM declarative (0.0.20) deprecation (1.1.0) activesupport - devise (4.9.4) - bcrypt (~> 3.0) - orm_adapter (~> 0.1) - railties (>= 4.1.0) - responders - warden (~> 1.2.3) - devise-guests (0.8.3) - devise - diff-lcs (1.5.1) disposable (0.6.3) declarative (>= 0.0.9, < 1.0.0) representable (>= 3.1.1, < 4) - domain_name (0.6.20240107) - dotenv (2.8.1) - dotenv-rails (2.8.1) - dotenv (= 2.8.1) - railties (>= 3.2) + dotenv (3.1.2) + dotenv-rails (3.1.2) + dotenv (= 3.1.2) + railties (>= 6.1) draper (4.0.2) actionpack (>= 5.0) activemodel (>= 5.0) @@ -256,22 +308,21 @@ GEM scanf (~> 1.0) sxp (~> 1.3) unicode-types (~> 1.8) + ed25519 (1.3.0) erubi (1.13.0) ethon (0.16.0) ffi (>= 1.15.0) execjs (2.9.1) - faraday (2.12.0) - faraday-net_http (>= 2.0, < 3.4) - json - logger + faraday (2.9.1) + faraday-net_http (>= 2.0, < 3.2) faraday-encoding (0.0.6) faraday faraday-multipart (1.0.4) multipart-post (~> 2) - faraday-net_http (3.3.0) + faraday-net_http (3.1.1) net-http - fcrepo_wrapper (0.9.0) - ruby-progressbar + faraday-retry (2.2.1) + faraday (~> 2.0) ffi (1.17.0-aarch64-linux-gnu) ffi (1.17.0-aarch64-linux-musl) ffi (1.17.0-arm-linux-gnu) @@ -282,9 +333,6 @@ GEM ffi (1.17.0-x86_64-darwin) ffi (1.17.0-x86_64-linux-gnu) ffi (1.17.0-x86_64-linux-musl) - ffi-compiler (1.3.2) - ffi (>= 1.15.5) - rake flipflop (2.7.1) activesupport (>= 4.0) terminal-table (>= 1.8) @@ -292,11 +340,25 @@ GEM jquery-rails font-awesome-rails (4.7.0.8) railties (>= 3.2, < 8.0) + gapic-common (0.22.0) + faraday (>= 1.9, < 3.a) + faraday-retry (>= 1.0, < 3.a) + google-protobuf (>= 3.25, < 5.a) + googleapis-common-protos (~> 1.6) + googleapis-common-protos-types (~> 1.15) + googleauth (~> 1.11) + grpc (~> 1.65) geocoder (1.8.3) base64 (>= 0.1.0) csv (>= 3.0.0) globalid (1.2.1) activesupport (>= 6.1) + google-analytics-data (0.6.1) + google-analytics-data-v1beta (>= 0.11, < 2.a) + google-cloud-core (~> 1.6) + google-analytics-data-v1beta (0.13.1) + gapic-common (>= 0.21.1, < 2.a) + google-cloud-errors (~> 1.0) google-apis-core (0.15.1) addressable (~> 2.5, >= 2.5.1) googleauth (~> 1.9) @@ -305,10 +367,38 @@ GEM mutex_m representable (~> 3.0) retriable (>= 2.0, < 4.a) - google-apis-drive_v3 (0.56.0) + google-apis-drive_v3 (0.57.0) google-apis-core (>= 0.15.0, < 2.a) + google-cloud-core (1.7.1) + google-cloud-env (>= 1.0, < 3.a) + google-cloud-errors (~> 1.0) google-cloud-env (2.2.0) faraday (>= 1.0, < 3.a) + google-cloud-errors (1.4.0) + google-protobuf (4.28.2) + bigdecimal + rake (>= 13) + google-protobuf (4.28.2-aarch64-linux) + bigdecimal + rake (>= 13) + google-protobuf (4.28.2-arm64-darwin) + bigdecimal + rake (>= 13) + google-protobuf (4.28.2-x86-linux) + bigdecimal + rake (>= 13) + google-protobuf (4.28.2-x86_64-darwin) + bigdecimal + rake (>= 13) + google-protobuf (4.28.2-x86_64-linux) + bigdecimal + rake (>= 13) + googleapis-common-protos (1.6.0) + google-protobuf (>= 3.18, < 5.a) + googleapis-common-protos-types (~> 1.7) + grpc (~> 1.41) + googleapis-common-protos-types (1.16.0) + google-protobuf (>= 3.18, < 5.a) googleauth (1.11.0) faraday (>= 1.0, < 3.a) google-cloud-env (~> 2.1) @@ -316,6 +406,24 @@ GEM multi_json (~> 1.11) os (>= 0.9, < 2.0) signet (>= 0.16, < 2.a) + grpc (1.66.0) + google-protobuf (>= 3.25, < 5.0) + googleapis-common-protos-types (~> 1.0) + grpc (1.66.0-aarch64-linux) + google-protobuf (>= 3.25, < 5.0) + googleapis-common-protos-types (~> 1.0) + grpc (1.66.0-arm64-darwin) + google-protobuf (>= 3.25, < 5.0) + googleapis-common-protos-types (~> 1.0) + grpc (1.66.0-x86-linux) + google-protobuf (>= 3.25, < 5.0) + googleapis-common-protos-types (~> 1.0) + grpc (1.66.0-x86_64-darwin) + google-protobuf (>= 3.25, < 5.0) + googleapis-common-protos-types (~> 1.0) + grpc (1.66.0-x86_64-linux) + google-protobuf (>= 3.25, < 5.0) + googleapis-common-protos-types (~> 1.0) haml (6.3.0) temple (>= 0.8.2) thor @@ -326,15 +434,6 @@ GEM hashie (5.0.0) hiredis (0.6.3) htmlentities (4.3.4) - http (5.2.0) - addressable (~> 2.8) - base64 (~> 0.1) - http-cookie (~> 1.0) - http-form_data (~> 2.2) - llhttp-ffi (~> 0.5.0) - http-cookie (1.0.7) - domain_name (~> 0.5) - http-form_data (2.3.0) http_logger (0.7.0) httpclient (2.8.3) hydra-access-controls (12.1.0) @@ -380,66 +479,9 @@ GEM hydra-derivatives (~> 3.6) hydra-file_characterization (~> 1.0) hydra-pcdm (>= 0.9) - hyrax (5.0.1) - active-fedora (~> 14.0) - almond-rails (~> 0.1) - awesome_nested_set (~> 3.1) - blacklight (~> 7.29) - blacklight-gallery (~> 4.0) - breadcrumbs_on_rails (~> 3.0) - browse-everything (>= 0.16, < 2.0) - carrierwave (~> 1.0) - clipboard-rails (~> 1.5) - concurrent-ruby (~> 1.0) - connection_pool (~> 2.4) - draper (~> 4.0) - dry-container (~> 0.11) - dry-events (~> 1.0, >= 1.0.1) - dry-logic (~> 1.5) - dry-monads (~> 1.6) - dry-validation (~> 1.10) - flipflop (~> 2.3) - flot-rails (~> 0.0.6) - font-awesome-rails (~> 4.2) - hydra-derivatives (~> 3.3) - hydra-editor (~> 6.0) - hydra-file_characterization (~> 1.1) - hydra-head (~> 12.0) - hydra-works (>= 0.16) - iiif_manifest (>= 0.3, < 2.0) - json-schema - legato (~> 0.3) - linkeddata - mailboxer (~> 0.12) - nest (~> 3.1) - noid-rails (~> 3.0) - oauth - oauth2 (~> 1.2) - openseadragon - posix-spawn - qa (~> 5.5, >= 5.5.1) - rails (~> 6.1) - rails_autolink (~> 1.1) - rdf-rdfxml - rdf-vocab (~> 3.0) - redis (~> 4.0) - redis-namespace (~> 1.5) - redlock (>= 0.1.2, < 2.0) - reform (~> 2.3) - reform-rails (~> 0.2.0) - retriable (>= 2.9, < 4.0) - sass-rails (~> 6.0) - select2-rails (~> 3.5) - signet - sprockets (= 3.7.2) - tinymce-rails (~> 5.10) - valkyrie (~> 3.1.1) - view_component (~> 2.74.1) i18n (1.14.6) concurrent-ruby (~> 1.0) ice_nine (0.11.2) - iiif-image-api (0.2.0) - activesupport iiif_manifest (1.6.0) activesupport (>= 4) jbuilder (2.13.0) @@ -465,7 +507,7 @@ GEM rdf (~> 3.3) json-schema (5.0.0) addressable (~> 2.8) - jwt (2.9.0) + jwt (2.9.1) base64 kaminari (1.2.2) activesupport (>= 4.1.0) @@ -532,12 +574,6 @@ GEM sparql (~> 3.3) sparql-client (~> 3.3) yaml-ld (~> 0.0) - listen (3.9.0) - rb-fsevent (~> 0.10, >= 0.10.3) - rb-inotify (~> 0.9, >= 0.9.10) - llhttp-ffi (0.5.0) - ffi-compiler (~> 1.0) - rake (~> 13.0) logger (1.6.1) loofah (2.22.0) crass (~> 1.0.2) @@ -558,7 +594,6 @@ GEM mime-types-data (3.2024.0903) mini_magick (4.13.2) mini_mime (1.1.5) - minitar (1.0.2) minitest (5.25.1) msgpack (1.7.2) multi_json (1.15.0) @@ -581,8 +616,13 @@ GEM net-protocol net-protocol (0.2.2) timeout + net-scp (4.0.0) + net-ssh (>= 2.6.5, < 8.0.0) + net-sftp (4.0.0) + net-ssh (>= 5.0.0, < 8.0.0) net-smtp (0.5.0) net-protocol + net-ssh (7.2.3) nio4r (2.7.3) noid (0.9.0) noid-rails (3.2.0) @@ -614,12 +654,10 @@ GEM rack (>= 1.2, < 4) openseadragon (0.7.0) rails (> 6.1.0) - orm_adapter (0.5.0) os (1.1.4) ostruct (0.6.0) parslet (2.0.0) pg (1.5.8) - popper_js (1.16.1) posix-spawn (0.3.15) psych (3.3.4) public_suffix (6.0.1) @@ -640,8 +678,6 @@ GEM linkeddata (~> 3.3) rack (>= 2.2, < 4) rack-rdf (~> 3.3) - rack-mini-profiler (2.3.4) - rack (>= 1.2.0) rack-protection (2.2.4) rack rack-proxy (0.7.7) @@ -684,9 +720,6 @@ GEM rake (>= 12.2) thor (~> 1.0) rake (13.2.1) - rb-fsevent (0.11.2) - rb-inotify (0.11.1) - ffi (~> 1.0) rdf (3.3.2) bcp47_spec (~> 0.2) bigdecimal (~> 3.1, >= 3.1.5) @@ -776,42 +809,17 @@ GEM reform-rails (0.2.6) activemodel (>= 5.0) reform (>= 2.3.1, < 3.0.0) - regexp_parser (2.9.2) representable (3.2.0) declarative (< 0.1.0) trailblazer-option (>= 0.1.1, < 0.2.0) uber (< 0.2.0) request_store (1.7.0) rack (>= 1.4) - responders (3.1.1) - actionpack (>= 5.2) - railties (>= 5.2) retriable (3.1.2) rexml (3.3.7) - riiif (2.5.0) - deprecation (>= 1.0.0) - iiif-image-api (>= 0.1.0) - railties (>= 4.2, < 8) rsolr (2.6.0) builder (>= 2.1.2) faraday (>= 0.9, < 3, != 2.0.0) - rspec-core (3.13.1) - rspec-support (~> 3.13.0) - rspec-expectations (3.13.3) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.13.0) - rspec-mocks (3.13.1) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.13.0) - rspec-rails (6.1.5) - actionpack (>= 6.1) - activesupport (>= 6.1) - railties (>= 6.1) - rspec-core (~> 3.13) - rspec-expectations (~> 3.13) - rspec-mocks (~> 3.13) - rspec-support (~> 3.13) - rspec-support (3.13.1) ruby-box (1.15.0) addressable json @@ -819,7 +827,6 @@ GEM oauth2 ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) - rubyzip (2.3.2) sass-rails (6.0.0) sassc-rails (~> 2.1, >= 2.1.1) sassc (2.4.0) @@ -832,10 +839,6 @@ GEM tilt scanf (1.0.0) select2-rails (3.5.11) - selenium-webdriver (4.10.0) - rexml (~> 3.2, >= 3.2.5) - rubyzip (>= 1.2.2, < 3.0) - websocket (~> 1.0) semantic_range (3.0.0) shacl (0.4.1) json-ld (~> 3.3) @@ -868,11 +871,6 @@ GEM snaky_hash (2.0.1) hashie version_gem (~> 1.1, >= 1.1.1) - solr_wrapper (4.0.2) - http - minitar - retriable - ruby-progressbar sparql (3.3.0) builder (~> 3.2, >= 3.2.4) ebnf (~> 2.4) @@ -885,7 +883,6 @@ GEM sparql-client (3.3.0) net-http-persistent (~> 4.0, >= 4.0.2) rdf (~> 3.3) - spring (4.2.1) sprockets (3.7.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) @@ -897,6 +894,12 @@ GEM actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) + sshkit (1.22.2) + base64 + mutex_m + net-scp (>= 1.1.2) + net-sftp (>= 2.1.2) + net-ssh (>= 2.8.0) ssrf_filter (1.0.8) sxp (1.3.0) matrix (~> 0.4) @@ -913,10 +916,6 @@ GEM turbolinks (5.2.1) turbolinks-source (~> 5.2) turbolinks-source (5.2.0) - twitter-typeahead-rails (0.11.1.pre.corejavascript) - actionpack (>= 3.1) - jquery-rails - railties (>= 3.1) typhoeus (1.4.1) ethon (>= 0.9.0) tzinfo (2.0.6) @@ -925,7 +924,7 @@ GEM unicode-display_width (2.6.0) unicode-types (1.10.0) uri (0.13.1) - valkyrie (3.1.5) + valkyrie (3.3.0) activemodel activesupport dry-struct @@ -944,28 +943,14 @@ GEM activesupport (>= 5.0.0, < 8.0) concurrent-ruby (~> 1.0) method_source (~> 1.0) - warden (1.2.9) - rack (>= 2.0.9) - web-console (4.2.1) - actionview (>= 6.0.0) - activemodel (>= 6.0.0) - bindex (>= 0.4.0) - railties (>= 6.0.0) - webdrivers (5.3.1) - nokogiri (~> 1.6) - rubyzip (>= 1.3.0) - selenium-webdriver (~> 4.0, < 4.11) webpacker (5.4.4) activesupport (>= 5.2) rack-proxy (>= 0.6.1) railties (>= 5.2) semantic_range (>= 2.3.0) - websocket (1.2.11) websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - xpath (3.2.0) - nokogiri (~> 1.8) yaml-ld (0.0.3) json-ld (~> 3.3) psych (>= 3.3) @@ -989,35 +974,22 @@ PLATFORMS x86_64-linux-musl DEPENDENCIES + bcrypt_pbkdf (>= 1.0, < 2.0) bootsnap (>= 1.4.4) - bootstrap (~> 4.0) - byebug - capybara (>= 3.26) - devise - devise-guests (~> 0.8) - dotenv-rails (~> 2.8) - fcrepo_wrapper - hyrax (= 5.0.1) + capistrano (~> 3.18) + capistrano-bundler (~> 1.3) + capistrano-rails (~> 1.6) + capistrano-rbenv (~> 2.2) + dotenv-rails + ed25519 (>= 1.2, < 2.0) + hyrax! jbuilder (~> 2.7) - jquery-rails - listen (~> 3.3) - openseadragon (>= 0.2.0) - pg (~> 1.1) + pg (~> 1.3) puma (~> 5.0) - rack-mini-profiler (~> 2.0) - rails (~> 6.1.7, >= 6.1.7.8) - riiif (~> 2.1) - rsolr (>= 1.0, < 3) - rspec-rails + rails (~> 6.1) sass-rails (>= 6) - selenium-webdriver (>= 4.0.0.rc1) - solr_wrapper (>= 0.3) - spring turbolinks (~> 5) - twitter-typeahead-rails (= 0.11.1.pre.corejavascript) tzinfo-data - web-console (>= 4.1.0) - webdrivers webpacker (~> 5.0) RUBY VERSION diff --git a/config/database.yml b/config/database.yml index 8ebce58..f0068f5 100644 --- a/config/database.yml +++ b/config/database.yml @@ -16,71 +16,16 @@ # default: &default adapter: postgresql - encoding: unicode - # For details on connection pooling, see Rails configuration guide - # https://guides.rubyonrails.org/configuring.html#database-pooling - pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> - -development: - <<: *default - database: hyrax_v5_bare_bones_non_pair_performance_development - - # The specified database role being used to connect to postgres. - # To create additional roles in postgres see `$ createuser --help`. - # When left blank, postgres will use the default role. This is - # the same name as the operating system user running Rails. - #username: hyrax_v5_bare_bones_non_pair_performance - - # The password associated with the postgres role (username). - #password: + pool: <%= ENV.fetch('DB_POOL') { 5 } %> + timeout: <%= ENV.fetch('DB_TIMEOUT') { 5000 } %> + database: <%= ENV['DB_NAME'] %> + username: <%= ENV['DB_USERNAME'] %> + password: <%= ENV['DB_PASSWORD'] %> + host: <%= ENV['DB_HOST'] %> + port: <%= ENV['DB_PORT'] %> - # Connect on a TCP socket. Omitted by default since the client uses a - # domain socket that doesn't need configuration. Windows does not have - # domain sockets, so uncomment these lines. - #host: localhost - # The TCP port the server listens on. Defaults to 5432. - # If your server runs on a different port number, change accordingly. - #port: 5432 - - # Schema search path. The server defaults to $user,public - #schema_search_path: myapp,sharedapp,public - - # Minimum log levels, in increasing order: - # debug5, debug4, debug3, debug2, debug1, - # log, notice, warning, error, fatal, and panic - # Defaults to warning. - #min_messages: notice - -# Warning: The database defined as "test" will be erased and -# re-generated from your development database when you run "rake". -# Do not set this db to the same as development or production. -test: - <<: *default - database: hyrax_v5_bare_bones_non_pair_performance_test - -# As with config/credentials.yml, you never want to store sensitive information, -# like your database password, in your source code. If your source code is -# ever seen by anyone, they now have access to your database. -# -# Instead, provide the password or a full connection URL as an environment -# variable when you boot the app. For example: -# -# DATABASE_URL="postgres://myuser:mypass@localhost/somedatabase" -# -# If the connection URL is provided in the special DATABASE_URL environment -# variable, Rails will automatically merge its configuration values on top of -# the values provided in this file. Alternatively, you can specify a connection -# URL environment variable explicitly: -# -# production: -# url: <%= ENV['MY_APP_DATABASE_URL'] %> -# -# Read https://guides.rubyonrails.org/configuring.html#configuring-a-database -# for a full overview on how database connection configuration can be specified. -# production: <<: *default - database: hyrax_v5_bare_bones_non_pair_performance_production - username: hyrax_v5_bare_bones_non_pair_performance - password: <%= ENV['HYRAX_V5_BARE_BONES_NON_PAIR_PERFORMANCE_DATABASE_PASSWORD'] %> + encoding: unicode + pool: 50 diff --git a/config/deploy.rb b/config/deploy.rb new file mode 100644 index 0000000..24c1067 --- /dev/null +++ b/config/deploy.rb @@ -0,0 +1,58 @@ +# config valid for current version and patch releases of Capistrano +lock "~> 3.18.1" + +set :application, "hyrax_v5_bare_bones_non_pair_performance" +set :repo_url, "https://github.com/emory-libraries/hyrax_v5_bare_bones_non_pair_performance" +set :deploy_to, '/opt/dlp-selfdeposit' +set :rbenv_ruby, '3.2.2' +set :rbenv_custom_path, '/usr/local/rbenv' +set :rails_env, 'production' +set :assets_prefix, "#{shared_path}/public/assets" +set :migration_role, :app +set :service_unit_name, "sidekiq.service" + +SSHKit.config.command_map[:rake] = 'bundle exec rake' + +set :branch, ENV['REVISION'] || ENV['BRANCH'] || ENV['BRANCH_NAME'] || 'main' +append :linked_dirs, "log", "public/assets", "tmp/pids", "tmp/cache", "tmp/sockets", + "tmp/imports", "config/emory/groups", "tmp/csv_uploads", "tmp/csv_uploads_cache" + +append :linked_files, ".env.production", "config/secrets.yml" + +set :default_env, + PATH: '$PATH:/usr/local/rbenv/shims/ruby', + LD_LIBRARY_PATH: '$LD_LIBRARY_PATH:/usr/lib64', + PASSENGER_INSTANCE_REGISTRY_DIR: '/var/run' + +# Default value for local_user is ENV['USER'] +set :local_user, -> { `git config user.name`.chomp } + +namespace :sidekiq do + task :restart do + invoke 'sidekiq:stop' + invoke 'sidekiq:start' + end + + before 'deploy:finished', 'sidekiq:restart' + + task :stop do + on roles(:app) do + execute :sudo, :systemctl, :stop, :sidekiq + end + end + + task :start do + on roles(:app) do + execute :sudo, :systemctl, :start, :sidekiq + end + end +end + +# Restart apache +namespace :deploy do + after :restart_apache, :restart_tomcat do + on roles(:ubuntu) do + execute :sudo, :systemctl, :restart, :tomcat + end + end +end diff --git a/config/deploy/production.rb b/config/deploy/production.rb new file mode 100644 index 0000000..1062a6a --- /dev/null +++ b/config/deploy/production.rb @@ -0,0 +1,2 @@ +server ENV['SERVER_IP'], user: 'deploy', roles: [:web, :app, :db, :ubuntu] +set :stage, :PRODUCTION diff --git a/config/secrets.yml b/config/secrets.yml new file mode 100644 index 0000000..1afe249 --- /dev/null +++ b/config/secrets.yml @@ -0,0 +1,31 @@ +# Be sure to restart your server when you modify this file. + +# Your secret key is used for verifying the integrity of signed cookies. +# If you change this key, all old signed cookies will become invalid! + +# Make sure the secret is at least 30 characters and all random, +# no regular words or you'll be exposed to dictionary attacks. +# You can use `rails secret` to generate a secure secret key. + +# Make sure the secrets in this file are kept private +# if you're sharing your code publicly. + +# Shared secrets are available across all environments. + +# shared: +# api_key: a1B2c3D4e5F6 + +# Environmental secrets are only available for that specific environment. + +development: + secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> +test: + secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> + +# Do not keep production secrets in the unencrypted secrets file. +# Instead, either read values from the environment. +# Or, use `bin/rails secrets:setup` to configure encrypted secrets +# and move the `production:` environment over there. + +production: + secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>