diff --git a/config/cms/docker_run_production.py b/config/cms/docker_run_production.py index 2dc954c1..7c8b684a 100644 --- a/config/cms/docker_run_production.py +++ b/config/cms/docker_run_production.py @@ -143,6 +143,9 @@ LOG_DIR = config("LOG_DIR", default="/edx/var/logs/edx") +MEMCACHED_HOST = config("MEMCACHED_HOST", default="memcached") +MEMCACHED_PORT = config("MEMCACHED_PORT", default=11211, formatter=int) + CACHES = config( "CACHES", default={ @@ -152,7 +155,7 @@ }, "default": { "BACKEND": "django.core.cache.backends.memcached.MemcachedCache", - "LOCATION": "memcached:11211", + "LOCATION": "{}:{}".format(MEMCACHED_HOST, MEMCACHED_PORT), } }, formatter=json.loads, diff --git a/config/lms/docker_run_production.py b/config/lms/docker_run_production.py index be41d752..bc61a42a 100644 --- a/config/lms/docker_run_production.py +++ b/config/lms/docker_run_production.py @@ -210,6 +210,9 @@ # being a str() SESSION_COOKIE_NAME = str(config("SESSION_COOKIE_NAME")) +MEMCACHED_HOST = config("MEMCACHED_HOST", default="memcached") +MEMCACHED_PORT = config("MEMCACHED_PORT", default=11211, formatter=int) + CACHES = config( "CACHES", default={ @@ -219,7 +222,7 @@ }, "default": { "BACKEND": "django.core.cache.backends.memcached.MemcachedCache", - "LOCATION": "memcached:11211", + "LOCATION": "{}:{}".format(MEMCACHED_HOST, MEMCACHED_PORT), } }, formatter=json.loads,