diff --git a/rails/Dockerfile b/rails/Dockerfile index 4aebb9b0d..bc2d9a8b2 100644 --- a/rails/Dockerfile +++ b/rails/Dockerfile @@ -57,9 +57,7 @@ EXPOSE 3000 ENV RAILS_ENV="production" \ AUTO_RUN_MIGRATIONS=on \ - DATABASE_URL="" \ - OFFLINE_MODE="no" \ - SECRET_KEY_BASE="" + DATABASE_URL="" RUN apk --no-cache add \ tzdata \ diff --git a/rails/config/environments/offline.rb b/rails/config/environments/offline.rb index 1fc940627..69bf38d21 100644 --- a/rails/config/environments/offline.rb +++ b/rails/config/environments/offline.rb @@ -31,7 +31,9 @@ # including the ones that sign and encrypt cookies. config.secret_key_base = lambda { # Always use configured SECRET_KEY_BASE env var if one is configured - if ENV.fetch("SECRET_KEY_BASE", false) + # Presence check is to ensure that we don't attempt to set an empty string + # as the secret_key_base. + if ENV.fetch("SECRET_KEY_BASE", false).present? secrets.secret_key_base ||= ENV["SECRET_KEY_BASE"] else key_file = Rails.root.join("tmp/offline_secret.txt") @@ -96,8 +98,6 @@ # Compress CSS using a preproccessor # config.assets.css_compressor = :sass - config.assets.prefix = "/offline-assets" - # Fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = false