diff --git a/config/environments/appliance.rb b/config/environments/appliance.rb index 5fb4e57f5..00bb200de 100644 --- a/config/environments/appliance.rb +++ b/config/environments/appliance.rb @@ -74,7 +74,7 @@ require Rails.root.join('config', "bioportal_config_#{Rails.env}.rb") # Use a different cache store in the appliance. - config.cache_store = :mem_cache_store, { :namespace => 'bioportal_web_ui', :expires_in => 1.day } + config.cache_store = :mem_cache_store, ENV["MEMCACHE_SERVERS"] || "localhost:11211", { :namespace => 'bioportal_web_ui', :expires_in => 1.day } # Disable serving static files from the `/public` folder by default since # Apache or NGINX already handles this. diff --git a/config/environments/production.rb b/config/environments/production.rb index 22e595a3d..c03ab3144 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -84,7 +84,7 @@ require Rails.root.join('config', "bioportal_config_#{Rails.env}.rb") # Use a different cache store in production. - config.cache_store = :mem_cache_store, { namespace: 'bioportal_web_ui', expires_in: 1.day } + config.cache_store = :mem_cache_store, ENV["MEMCACHE_SERVERS"] || "localhost:11211", { namespace: 'bioportal_web_ui', expires_in: 1.day } # Add custom data attributes to sanitize allowed list config.action_view.sanitized_allowed_attributes = ['id', 'class', 'style', 'data-cls', 'data-ont'] diff --git a/config/environments/staging.rb b/config/environments/staging.rb index 287307b75..d99703f49 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -74,7 +74,7 @@ require Rails.root.join('config', "bioportal_config_#{Rails.env}.rb") # Use a different cache store in staging. - config.cache_store = :mem_cache_store, { namespace: 'bioportal_web_ui', expires_in: 1.day } + config.cache_store = :mem_cache_store, ENV["MEMCACHE_SERVERS"] || "localhost:11211", { namespace: 'bioportal_web_ui', expires_in: 1.day } # Disable serving static files from the `/public` folder by default since # Apache or NGINX already handles this.