mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 10:01:11 +08:00
FEATURE: SKIP_DB_AND_REDIS env var (#7756)
Sometimes we would like to create a base image without any DB access, this assists in creating custom base images with custom plugins that already includes `public/assets` Following this change set you can run: ``` SPROCKETS_CONCURRENT=1 DONT_PRECOMPILE_CSS=1 SKIP_DB_AND_REDIS=1 RAILS_ENV=production bin/rake assets:precompile ``` Then it is straight forward to create a base image without needing a DB or Redis.
This commit is contained in:
@ -245,7 +245,13 @@ module Discourse
|
||||
end
|
||||
|
||||
def self.cache
|
||||
@cache ||= Cache.new
|
||||
@cache ||= begin
|
||||
if GlobalSetting.skip_redis?
|
||||
ActiveSupport::Cache::MemoryStore.new
|
||||
else
|
||||
Cache.new
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Get the current base URL for the current site
|
||||
|
Reference in New Issue
Block a user