{
  "SITE_NAME": "{{ CMS_HOST }}",
  "BOOK_URL": "",
  "LOG_DIR": "/openedx/data/logs",
  "LOGGING_ENV": "sandbox",
  "OAUTH_OIDC_ISSUER": "{{ JWT_COMMON_ISSUER }}",
  "PLATFORM_NAME": "{{ PLATFORM_NAME }}",
  "FEATURES": {
    {{ patch("common-env-features", separator=",\n", suffix=",")|indent(4) }}
    {{ patch("cms-env-features", separator=",\n", suffix=",")|indent(4) }}
    "CERTIFICATES_HTML_VIEW": true,
    "PREVIEW_LMS_BASE": "preview.{{ LMS_HOST }}",
    "ENABLE_COURSEWARE_INDEX": true,
    "ENABLE_CSMH_EXTENDED": false,
    "ENABLE_LIBRARY_INDEX": true
  },
  "LMS_ROOT_URL": "{{ "https" if ACTIVATE_HTTPS else "http" }}://{{ LMS_HOST }}",
  "CMS_ROOT_URL": "{{ "https" if ACTIVATE_HTTPS else "http" }}://{{ CMS_HOST }}",
  "CMS_BASE": "{{ CMS_HOST }}",
  "LMS_BASE": "{{ LMS_HOST }}",
  "CONTACT_EMAIL": "{{ CONTACT_EMAIL }}",
  "CELERY_BROKER_TRANSPORT": "amqp",
  "CELERY_BROKER_HOSTNAME": "{{ RABBITMQ_HOST }}",
  "CELERY_BROKER_USER": "{{ RABBITMQ_USERNAME }}",
  "CELERY_BROKER_PASSWORD": "{{ RABBITMQ_PASSWORD }}",
  "ALTERNATE_WORKER_QUEUES": "lms",
  "ENABLE_COMPREHENSIVE_THEMING": true,
  "COMPREHENSIVE_THEME_DIRS": ["/openedx/themes"],
  "STATIC_ROOT_BASE": "/openedx/staticfiles",
  "ELASTIC_SEARCH_CONFIG": [{
    {% if ELASTICSEARCH_SCHEME == "https" %}"use_ssl": true,{% endif %}
    "host": "{{ ELASTICSEARCH_HOST }}",
    "port": {{ ELASTICSEARCH_PORT }}
  }],
  "EMAIL_BACKEND": "django.core.mail.backends.smtp.EmailBackend",
  "EMAIL_HOST": "{{ SMTP_HOST }}",
  "EMAIL_PORT": {{ SMTP_PORT }},
  "EMAIL_USE_TLS": {{ "true" if SMTP_USE_TLS else "false" }},
  "HTTPS": "{{ "on" if ACTIVATE_HTTPS else "off" }}",
  "LANGUAGE_CODE": "{{ LANGUAGE_CODE }}",
  "SESSION_COOKIE_DOMAIN": ".{{ LMS_HOST|common_domain(CMS_HOST) }}",
  {{ patch("cms-env", separator=",\n", suffix=",")|indent(2) }}
  "CACHES": {
    "default": {
      "KEY_PREFIX": "default",
      "VERSION": "1",
      "BACKEND": "django.core.cache.backends.memcached.MemcachedCache",
      "KEY_FUNCTION": "util.memcache.safe_key",
      "LOCATION": "{{ MEMCACHED_HOST }}:{{ MEMCACHED_PORT }}"
    },
    "general": {
      "KEY_PREFIX":  "general",
      "BACKEND": "django.core.cache.backends.memcached.MemcachedCache",
      "KEY_FUNCTION": "util.memcache.safe_key",
      "LOCATION": "{{ MEMCACHED_HOST }}:{{ MEMCACHED_PORT }}"
    },
    "mongo_metadata_inheritance": {
      "KEY_PREFIX": "mongo_metadata_inheritance",
      "TIMEOUT": 300,
      "BACKEND": "django.core.cache.backends.memcached.MemcachedCache",
      "KEY_FUNCTION": "util.memcache.safe_key",
      "LOCATION": "{{ MEMCACHED_HOST }}:{{ MEMCACHED_PORT }}"
    },
    "staticfiles": {
      "KEY_PREFIX": "staticfiles_cms",
      "BACKEND": "django.core.cache.backends.memcached.MemcachedCache",
      "KEY_FUNCTION": "util.memcache.safe_key",
      "LOCATION": "{{ MEMCACHED_HOST }}:{{ MEMCACHED_PORT }}"
    },
    "configuration": {
      "KEY_PREFIX": "configuration",
      "BACKEND": "django.core.cache.backends.memcached.MemcachedCache",
      "KEY_FUNCTION": "util.memcache.safe_key",
      "LOCATION": "{{ MEMCACHED_HOST }}:{{ MEMCACHED_PORT }}"
    },
    "celery": {
      "KEY_PREFIX":  "celery",
      "TIMEOUT": "7200",
      "BACKEND": "django.core.cache.backends.memcached.MemcachedCache",
      "KEY_FUNCTION": "util.memcache.safe_key",
      "LOCATION": "{{ MEMCACHED_HOST }}:{{ MEMCACHED_PORT }}"
    },
    "course_structure_cache": {
      "KEY_PREFIX": "course_structure",
      "TIMEOUT": "7200",
      "BACKEND": "django.core.cache.backends.memcached.MemcachedCache",
      "KEY_FUNCTION": "util.memcache.safe_key",
      "LOCATION": "{{ MEMCACHED_HOST }}:{{ MEMCACHED_PORT }}"
    }
  },
{% include "apps/openedx/config/partials/auth.json" %}
}
