diff --git a/config/environments/development.rb b/config/environments/development.rb index 7870c6540..ff699ab75 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -71,7 +71,7 @@ config.assets.quiet = true # memcache setup - config.cache_store = ActiveSupport::Cache::MemCacheStore.new('localhost', namespace: 'BioPortal') + config.cache_store = :mem_cache_store, ENV['MEMCACHE_SERVERS'] || 'localhost', { namespace: 'BioPortal' } # Silence cache output config.cache_store.logger = Logger.new("/dev/null") if config.cache_store.respond_to?(:logger) @@ -93,4 +93,4 @@ # Uncomment if you wish to allow Action Cable access from any origin. # config.action_cable.disable_request_forgery_protection = true -end \ No newline at end of file +end diff --git a/config/environments/test.rb b/config/environments/test.rb index d35b8d0f7..80cb15b04 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -27,7 +27,7 @@ # Show full error reports and disable caching. config.consider_all_requests_local = true config.action_controller.perform_caching = false - config.cache_store = ActiveSupport::Cache::MemCacheStore.new('localhost:11211', namespace: 'BioPortal') + config.cache_store = :mem_cache_store, ENV['MEMCACHE_SERVERS'] || 'localhost', { namespace: 'BioPortal' } # Raise exceptions instead of rendering exception templates. config.action_dispatch.show_exceptions = false diff --git a/docker-compose.yml b/docker-compose.yml index 621e438b0..9bf553b95 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,7 +18,7 @@ x-app: &default-app BUNDLE_WITHOUT: "" BUNDLE_PATH: /usr/local/bundle DB_HOST: db - CACHE_HOST: cache + MEMCACHE_SERVERS: "cache:11211" tmpfs: - /tmp - /app/tmp/pids