diff --git a/Dockerfile b/Dockerfile index 4f7617d550..08c6af8e64 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,13 +29,13 @@ ENV RAILS_LOG_TO_STDOUT="1" \ BUNDLE_PATH=/usr/local/bundle \ BUNDLE_WITHOUT="${BUNDLE_WITHOUT}" -# fix for ruby v2.7.8 only -RUN gem install uri --no-document +RUN gem update --system --no-document && \ + gem install -N bundler COPY Gemfile* . RUN bundle install -RUN echo "--modules-folder /node_modules" > .yarnrc + COPY package.json *yarn* ./ RUN yarn install @@ -44,6 +44,7 @@ COPY . . # Precompile bootsnap code for faster boot times RUN bundle exec bootsnap precompile --gemfile app/ lib/ +RUN SECRET_KEY_BASE_DUMMY="1" ./bin/rails assets:precompile ENV BINDING="0.0.0.0" EXPOSE 3000 diff --git a/Gemfile b/Gemfile index d8160ecf09..5308a64aea 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source 'https://rubygems.org' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -gem 'rails', '7.0.3' +gem 'rails', '7.1.0' gem 'jsbundling-rails' diff --git a/Gemfile.lock b/Gemfile.lock index 69f44868eb..a88c25fa71 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -17,70 +17,78 @@ GIT GEM remote: https://rubygems.org/ specs: - actioncable (7.0.3) - actionpack (= 7.0.3) - activesupport (= 7.0.3) + actioncable (7.1.0) + actionpack (= 7.1.0) + activesupport (= 7.1.0) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.3) - actionpack (= 7.0.3) - activejob (= 7.0.3) - activerecord (= 7.0.3) - activestorage (= 7.0.3) - activesupport (= 7.0.3) + zeitwerk (~> 2.6) + actionmailbox (7.1.0) + actionpack (= 7.1.0) + activejob (= 7.1.0) + activerecord (= 7.1.0) + activestorage (= 7.1.0) + activesupport (= 7.1.0) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.3) - actionpack (= 7.0.3) - actionview (= 7.0.3) - activejob (= 7.0.3) - activesupport (= 7.0.3) + actionmailer (7.1.0) + actionpack (= 7.1.0) + actionview (= 7.1.0) + activejob (= 7.1.0) + activesupport (= 7.1.0) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp - rails-dom-testing (~> 2.0) - actionpack (7.0.3) - actionview (= 7.0.3) - activesupport (= 7.0.3) - rack (~> 2.0, >= 2.2.0) + rails-dom-testing (~> 2.2) + actionpack (7.1.0) + actionview (= 7.1.0) + activesupport (= 7.1.0) + nokogiri (>= 1.8.5) + rack (>= 2.2.4) + rack-session (>= 1.0.1) rack-test (>= 0.6.3) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.3) - actionpack (= 7.0.3) - activerecord (= 7.0.3) - activestorage (= 7.0.3) - activesupport (= 7.0.3) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + actiontext (7.1.0) + actionpack (= 7.1.0) + activerecord (= 7.1.0) + activestorage (= 7.1.0) + activesupport (= 7.1.0) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.3) - activesupport (= 7.0.3) + actionview (7.1.0) + activesupport (= 7.1.0) builder (~> 3.1) - erubi (~> 1.4) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (7.0.3) - activesupport (= 7.0.3) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activejob (7.1.0) + activesupport (= 7.1.0) globalid (>= 0.3.6) - activemodel (7.0.3) - activesupport (= 7.0.3) - activerecord (7.0.3) - activemodel (= 7.0.3) - activesupport (= 7.0.3) - activestorage (7.0.3) - actionpack (= 7.0.3) - activejob (= 7.0.3) - activerecord (= 7.0.3) - activesupport (= 7.0.3) + activemodel (7.1.0) + activesupport (= 7.1.0) + activerecord (7.1.0) + activemodel (= 7.1.0) + activesupport (= 7.1.0) + timeout (>= 0.4.0) + activestorage (7.1.0) + actionpack (= 7.1.0) + activejob (= 7.1.0) + activerecord (= 7.1.0) + activesupport (= 7.1.0) marcel (~> 1.0) - mini_mime (>= 1.1.0) - activesupport (7.0.3) + activesupport (7.1.0) + base64 + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) minitest (>= 5.1) + mutex_m tzinfo (~> 2.0) addressable (2.8.5) public_suffix (>= 2.0.2, < 6.0) @@ -99,6 +107,7 @@ GEM erubi (~> 1.4) parser (>= 2.4) smart_properties + bigdecimal (3.1.4) bindata (2.4.15) bindex (0.8.1) bootsnap (1.17.0) @@ -138,6 +147,7 @@ GEM railties (> 3.1) coderay (1.1.3) concurrent-ruby (1.2.2) + connection_pool (2.4.1) crass (1.0.6) css_parser (1.16.0) addressable @@ -152,11 +162,13 @@ GEM diff-lcs (1.5.0) docile (1.4.0) domain_name (0.6.20231109) + drb (2.2.0) + ruby2_keywords ed25519 (1.3.0) erubi (1.12.0) erubis (2.7.0) eventmachine (1.2.7) - excon (0.104.0) + excon (0.105.0) execjs (2.9.1) faraday (2.0.1) faraday-net_http (~> 2.0) @@ -229,7 +241,7 @@ GEM railties (>= 3.2.16) jsbundling-rails (1.2.1) railties (>= 6.0.0) - json (2.6.3) + json (2.7.0) json-jwt (1.16.3) activesupport (>= 4.2) aes_key_wrap @@ -284,13 +296,14 @@ GEM multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.3.0) + mutex_m (0.2.0) mysql2 (0.5.5) net-ftp (0.2.0) net-protocol time net-http (0.3.2) uri - net-imap (0.4.6) + net-imap (0.4.7) date net-protocol net-pop (0.1.2) @@ -305,7 +318,7 @@ GEM netrc (0.11.0) newrelic_rpm (9.6.0) base64 - nio4r (2.6.1) + nio4r (2.7.0) nokogiri (1.15.5-x86_64-darwin) racc (~> 1.4) nokogiri (1.15.5-x86_64-linux) @@ -364,22 +377,27 @@ GEM rack (>= 1.2.0) rack-protection (3.1.0) rack (~> 2.2, >= 2.2.4) + rack-session (1.0.1) + rack (< 3) rack-test (2.1.0) rack (>= 1.3) - rails (7.0.3) - actioncable (= 7.0.3) - actionmailbox (= 7.0.3) - actionmailer (= 7.0.3) - actionpack (= 7.0.3) - actiontext (= 7.0.3) - actionview (= 7.0.3) - activejob (= 7.0.3) - activemodel (= 7.0.3) - activerecord (= 7.0.3) - activestorage (= 7.0.3) - activesupport (= 7.0.3) + rackup (1.0.0) + rack (< 3) + webrick + rails (7.1.0) + actioncable (= 7.1.0) + actionmailbox (= 7.1.0) + actionmailer (= 7.1.0) + actionpack (= 7.1.0) + actiontext (= 7.1.0) + actionview (= 7.1.0) + activejob (= 7.1.0) + activemodel (= 7.1.0) + activerecord (= 7.1.0) + activestorage (= 7.1.0) + activesupport (= 7.1.0) bundler (>= 1.15.0) - railties (= 7.0.3) + railties (= 7.1.0) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -394,13 +412,14 @@ GEM actionview (> 3.1) activesupport (> 3.1) railties (> 3.1) - railties (7.0.3) - actionpack (= 7.0.3) - activesupport (= 7.0.3) - method_source + railties (7.1.0) + actionpack (= 7.1.0) + activesupport (= 7.1.0) + irb + rackup (>= 1.0.0) rake (>= 12.2) - thor (~> 1.0) - zeitwerk (~> 2.5) + thor (~> 1.0, >= 1.2.2) + zeitwerk (~> 2.6) rainbow (3.1.1) rake (13.1.0) rb-fsevent (0.11.2) @@ -411,7 +430,7 @@ GEM json redcarpet (3.6.0) regexp_parser (2.8.2) - reline (0.4.0) + reline (0.4.1) io-console (~> 0.5) rest-client (2.1.0) http-accept (>= 1.7.0, < 2.0) @@ -536,6 +555,7 @@ GEM activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) + webrick (1.8.1) websocket (1.2.10) websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) @@ -604,7 +624,7 @@ DEPENDENCIES psych (< 4) puma (~> 5.0) rack-mini-profiler - rails (= 7.0.3) + rails (= 7.1.0) rails-i18n (~> 7.0.0) rails_autolink rdoc diff --git a/config/environments/production.rb b/config/environments/production.rb index 3eea9fbc87..3eb3961f09 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -92,8 +92,10 @@ # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') # Include the BioPortal-specific configuration options - require Rails.root.join('config', "bioportal_config_#{Rails.env}.rb") - + if File.exist?(Rails.root.join('config', "bioportal_config_#{Rails.env}.rb")) + require Rails.root.join('config', "bioportal_config_#{Rails.env}.rb") + end + # Use a different cache store in production. config.cache_store = :mem_cache_store, ENV["MEMCACHE_SERVERS"] || "localhost:11211", { namespace: 'bioportal_web_ui', expires_in: 1.day } diff --git a/docker-compose.yml b/docker-compose.yml index 422d6c79d3..1eb928b19f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,5 @@ x-app: &default-app - image: agroportal/ontoportal_web_ui:test + image: agroportal/ontoportal_web_ui:development env_file: - ".env" tty: true