7
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-06-10 09:42:23 +00:00
tutor/tutor/templates/apps/openedx/config/cms.env.yml
Régis Behmo 602c381d6e fix: email sending from cms
Incorrect format of cms.yml config file was causing the following error on course import:

	cms-worker_1                 | Traceback (most recent call last):
	cms-worker_1                 |   File "/openedx/edx-platform/cms/djangoapps/cms_user_tasks/tasks.py", line 53, in send_task_complete_email
	cms-worker_1                 |     mail.send_mail(subject, message, from_address, [dest_addr], fail_silently=False)
	cms-worker_1                 |   File "/openedx/venv/lib/python3.8/site-packages/django/core/mail/__init__.py", line 61, in send_mail
	cms-worker_1                 |     return mail.send()
	cms-worker_1                 |   File "/openedx/venv/lib/python3.8/site-packages/django/core/mail/message.py", line 284, in send
	cms-worker_1                 |     return self.get_connection(fail_silently).send_messages([self])
	cms-worker_1                 |   File "/openedx/venv/lib/python3.8/site-packages/django/core/mail/backends/smtp.py", line 102, in send_messages
	cms-worker_1                 |     new_conn_created = self.open()
	cms-worker_1                 |   File "/openedx/venv/lib/python3.8/site-packages/django/core/mail/backends/smtp.py", line 62, in open
	cms-worker_1                 |     self.connection = self.connection_class(self.host, self.port, **connection_params)
	cms-worker_1                 |   File "/opt/pyenv/versions/3.8.12/lib/python3.8/smtplib.py", line 255, in __init__
	cms-worker_1                 |     (code, msg) = self.connect(host, port)
	cms-worker_1                 |   File "/opt/pyenv/versions/3.8.12/lib/python3.8/smtplib.py", line 339, in connect
	cms-worker_1                 |     self.sock = self._get_socket(host, port, self.timeout)
	cms-worker_1                 |   File "/opt/pyenv/versions/3.8.12/lib/python3.8/smtplib.py", line 310, in _get_socket
	cms-worker_1                 |     return socket.create_connection((host, port), timeout,
	cms-worker_1                 |   File "/opt/pyenv/versions/3.8.12/lib/python3.8/socket.py", line 787, in create_connection
	cms-worker_1                 |     for res in getaddrinfo(host, port, 0, SOCK_STREAM):
	cms-worker_1                 |   File "/opt/pyenv/versions/3.8.12/lib/python3.8/socket.py", line 918, in getaddrinfo
	cms-worker_1                 |     for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
	cms-worker_1                 | socket.gaierror: [Errno -8] Servname not supported for ai_socktype

The reason was that the trailing comma "," was interpreted as being part of the email port.
2022-06-20 14:33:48 +02:00

74 lines
3.3 KiB
YAML

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")|indent(2) }}
{{ patch("cms-env-features")|indent(2) }}
CERTIFICATES_HTML_VIEW: true
PREVIEW_LMS_BASE: "{{ PREVIEW_LMS_HOST }}"
ENABLE_COURSEWARE_INDEX: true
ENABLE_CSMH_EXTENDED: false
ENABLE_LEARNER_RECORDS: false
ENABLE_LIBRARY_INDEX: true
MILESTONES_APP: true
ENABLE_PREREQUISITE_COURSES: true
LMS_ROOT_URL: "{{ "https" if ENABLE_HTTPS else "http" }}://{{ LMS_HOST }}"
CMS_ROOT_URL: "{{ "https" if ENABLE_HTTPS else "http" }}://{{ CMS_HOST }}"
CMS_BASE: "{{ CMS_HOST }}"
LMS_BASE: "{{ LMS_HOST }}"
CONTACT_EMAIL: "{{ CONTACT_EMAIL }}"
CELERY_BROKER_TRANSPORT: "redis"
CELERY_BROKER_HOSTNAME: "{{ REDIS_HOST }}:{{ REDIS_PORT }}"
CELERY_BROKER_VHOST: "{{ OPENEDX_CELERY_REDIS_DB }}"
CELERY_BROKER_USER: "{{ REDIS_USERNAME }}"
CELERY_BROKER_PASSWORD: "{{ REDIS_PASSWORD }}"
ALTERNATE_WORKER_QUEUES: "lms"
ENABLE_COMPREHENSIVE_THEMING: true
COMPREHENSIVE_THEME_DIRS: ["/openedx/themes"]
STATIC_ROOT_BASE: "/openedx/staticfiles"
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 ENABLE_HTTPS else "off" }}"
LANGUAGE_CODE: "{{ LANGUAGE_CODE }}"
SESSION_COOKIE_DOMAIN: "{{ CMS_HOST }}"
{{ patch("cms-env") }}
CACHES:
default:
KEY_PREFIX: "default"
VERSION: "1"
BACKEND: "django_redis.cache.RedisCache"
LOCATION: "redis://{% if REDIS_USERNAME and REDIS_PASSWORD %}{{ REDIS_USERNAME }}:{{ REDIS_PASSWORD }}{% endif %}@{{ REDIS_HOST }}:{{ REDIS_PORT }}/{{ OPENEDX_CACHE_REDIS_DB }}"
general:
KEY_PREFIX: "general"
BACKEND: "django_redis.cache.RedisCache"
LOCATION: "redis://{% if REDIS_USERNAME and REDIS_PASSWORD %}{{ REDIS_USERNAME }}:{{ REDIS_PASSWORD }}{% endif %}@{{ REDIS_HOST }}:{{ REDIS_PORT }}/{{ OPENEDX_CACHE_REDIS_DB }}"
mongo_metadata_inheritance:
KEY_PREFIX: "mongo_metadata_inheritance"
TIMEOUT: 300
BACKEND: "django_redis.cache.RedisCache"
LOCATION: "redis://{% if REDIS_USERNAME and REDIS_PASSWORD %}{{ REDIS_USERNAME }}:{{ REDIS_PASSWORD }}{% endif %}@{{ REDIS_HOST }}:{{ REDIS_PORT }}/{{ OPENEDX_CACHE_REDIS_DB }}"
staticfiles:
KEY_PREFIX: "staticfiles_cms"
BACKEND: "django.core.cache.backends.locmem.LocMemCache"
LOCATION: "staticfiles_cms"
configuration:
KEY_PREFIX: "configuration"
BACKEND: "django_redis.cache.RedisCache"
LOCATION: "redis://{% if REDIS_USERNAME and REDIS_PASSWORD %}{{ REDIS_USERNAME }}:{{ REDIS_PASSWORD }}{% endif %}@{{ REDIS_HOST }}:{{ REDIS_PORT }}/{{ OPENEDX_CACHE_REDIS_DB }}"
celery:
KEY_PREFIX: "celery"
TIMEOUT: "7200"
BACKEND: "django_redis.cache.RedisCache"
LOCATION: "redis://{% if REDIS_USERNAME and REDIS_PASSWORD %}{{ REDIS_USERNAME }}:{{ REDIS_PASSWORD }}{% endif %}@{{ REDIS_HOST }}:{{ REDIS_PORT }}/{{ OPENEDX_CACHE_REDIS_DB }}"
course_structure_cache:
KEY_PREFIX: "course_structure"
TIMEOUT: "7200"
BACKEND: "django_redis.cache.RedisCache"
LOCATION: "redis://{% if REDIS_USERNAME and REDIS_PASSWORD %}{{ REDIS_USERNAME }}:{{ REDIS_PASSWORD }}{% endif %}@{{ REDIS_HOST }}:{{ REDIS_PORT }}/{{ OPENEDX_CACHE_REDIS_DB }}"
{% include "apps/openedx/config/partials/auth.yml" %}