Skip to content

Commit f2c4e0b

Browse files
authored
chore(offline): prep and make adjustments for a smoother offline experience (#970)
Co-authored-by: Laura Mosher <[email protected]>
1 parent f5a94e7 commit f2c4e0b

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

rails/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ EXPOSE 3000
5757

5858
ENV RAILS_ENV="production" \
5959
AUTO_RUN_MIGRATIONS=on \
60-
DATABASE_URL="" \
61-
OFFLINE_MODE="no" \
62-
SECRET_KEY_BASE=""
60+
DATABASE_URL=""
6361

6462
RUN apk --no-cache add \
6563
tzdata \

rails/config/environments/offline.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@
3131
# including the ones that sign and encrypt cookies.
3232
config.secret_key_base = lambda {
3333
# Always use configured SECRET_KEY_BASE env var if one is configured
34-
if ENV.fetch("SECRET_KEY_BASE", false)
34+
# Presence check is to ensure that we don't attempt to set an empty string
35+
# as the secret_key_base.
36+
if ENV.fetch("SECRET_KEY_BASE", false).present?
3537
secrets.secret_key_base ||= ENV["SECRET_KEY_BASE"]
3638
else
3739
key_file = Rails.root.join("tmp/offline_secret.txt")
@@ -96,8 +98,6 @@
9698
# Compress CSS using a preproccessor
9799
# config.assets.css_compressor = :sass
98100

99-
config.assets.prefix = "/offline-assets"
100-
101101
# Fallback to assets pipeline if a precompiled asset is missed.
102102
config.assets.compile = false
103103

0 commit comments

Comments
 (0)