diff --git a/Dockerfile b/Dockerfile index 91a5b4e7..c93cc1f1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,10 @@ FROM ruby:3.0 AS builder -RUN apt-get update && apt-get upgrade -y && apt-get install gnupg2 && \ - curl -sL https://deb.nodesource.com/setup_16.x | bash - && \ +RUN NODE_MAJOR=16 && \ + apt-get update && apt-get upgrade -y && apt-get install -y ca-certificates curl gnupg && \ + mkdir -p /etc/apt/keyrings && \ + curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ + echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \ curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \ apt-get update && apt-get install -y nodejs yarn \ diff --git a/config/environments/production.rb b/config/environments/production.rb index 74caf2ca..eaf71136 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -25,7 +25,7 @@ config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present? # Enable serving of images, stylesheets, and JavaScripts from an asset server. - config.asset_host = ENV.fetch("RAILS_ASSET_HOST") if ENV["RAILS_ASSET_HOST"].present? + config.asset_host = ENV.fetch("RAILS_ASSET_HOST", nil) if ENV["RAILS_ASSET_HOST"].present? # Enable serving of images, stylesheets, and JavaScripts from an asset server. # config.action_controller.asset_host = 'http://assets.example.com' @@ -47,7 +47,7 @@ # Use the lowest log level to ensure availability of diagnostic information # when problems arise. - config.log_level = %w(debug info warn error fatal).include?(ENV.fetch("RAILS_LOG_LEVEL")) ? ENV["RAILS_LOG_LEVEL"] : :info + config.log_level = %w(debug info warn error fatal).include?(ENV.fetch("RAILS_LOG_LEVEL", nil)) ? ENV["RAILS_LOG_LEVEL"].present? : :info # Prepend all log lines with the following tags. config.log_tags = [:request_id]