diff --git a/tutordiscovery/__about__.py b/tutordiscovery/__about__.py index d945113..610c111 100644 --- a/tutordiscovery/__about__.py +++ b/tutordiscovery/__about__.py @@ -1,2 +1 @@ __version__ = "16.0.1" - diff --git a/tutordiscovery/plugin.py b/tutordiscovery/plugin.py index 38d086a..c5c0893 100644 --- a/tutordiscovery/plugin.py +++ b/tutordiscovery/plugin.py @@ -1,10 +1,10 @@ from __future__ import annotations -from glob import glob import os -import pkg_resources import typing as t +from glob import glob +import pkg_resources from tutor import hooks as tutor_hooks from tutor.__about__ import __version_suffix__ @@ -15,6 +15,8 @@ __version__ += "-" + __version_suffix__ HERE = os.path.abspath(os.path.dirname(__file__)) +REPO_NAME = "course-discovery" +APP_NAME = "discovery" config: t.Dict[str, t.Dict[str, t.Any]] = { "defaults": { @@ -33,6 +35,12 @@ "REPOSITORY": "https://github.com/openedx/course-discovery.git", "REPOSITORY_VERSION": "{{ OPENEDX_COMMON_VERSION }}", }, + "unique": { + "MYSQL_PASSWORD": "{{ 8|random_string }}", + "SECRET_KEY": "{{ 20|random_string }}", + "OAUTH2_SECRET": "{{ 8|random_string }}", + "OAUTH2_SECRET_SSO": "{{ 8|random_string }}", + }, } # Initialization tasks @@ -78,10 +86,6 @@ ) -REPO_NAME = "course-discovery" -APP_NAME = "discovery" - - # Automount /openedx/discovery folder from the container @tutor_hooks.Filters.COMPOSE_MOUNTS.add() def _mount_course_discovery( @@ -104,7 +108,6 @@ def _mount_course_discovery_on_build( return mounts -####### Boilerplate code # Add the "templates" folder as a template root tutor_hooks.Filters.ENV_TEMPLATE_ROOTS.add_item( pkg_resources.resource_filename("tutordiscovery", "templates")