diff --git a/src/kolibri_app/__init__.py b/src/kolibri_app/__init__.py index 59222cc..d148eeb 100644 --- a/src/kolibri_app/__init__.py +++ b/src/kolibri_app/__init__.py @@ -4,7 +4,7 @@ from kolibri_app.constants import MAC -__version__ = "0.4.0" +__version__ = "0.4.1" os.environ["KOLIBRI_INSTALLER_VERSION"] = __version__ @@ -13,3 +13,4 @@ os.environ["DJANGO_SETTINGS_MODULE"] = "kolibri_app.django_app_settings" enable_plugin("kolibri.plugins.app") +enable_plugin("kolibri_app") diff --git a/src/kolibri_app/application.py b/src/kolibri_app/application.py index fa520d9..b2830ae 100644 --- a/src/kolibri_app/application.py +++ b/src/kolibri_app/application.py @@ -8,6 +8,7 @@ from kolibri.plugins.app.utils import interface from kolibri.plugins.app.utils import SHARE_FILE from kolibri.utils.conf import KOLIBRI_HOME +from kolibri.utils.conf import OPTIONS from kolibri.utils.server import KolibriProcessBus from magicbus.plugins import SimplePlugin @@ -78,7 +79,10 @@ def start_kolibri_server(self): if callable(share_file): interface.register_capabilities(**{SHARE_FILE: share_file}) - self.kolibri_server = KolibriProcessBus() + self.kolibri_server = KolibriProcessBus( + port=OPTIONS["Deployment"]["HTTP_PORT"], + zip_port=OPTIONS["Deployment"]["ZIP_CONTENT_PORT"], + ) app_plugin = AppPlugin(self.kolibri_server, self.load_kolibri) app_plugin.subscribe() self.kolibri_server.run() diff --git a/src/kolibri_app/kolibri_plugin.py b/src/kolibri_app/kolibri_plugin.py new file mode 100644 index 0000000..e19fd1d --- /dev/null +++ b/src/kolibri_app/kolibri_plugin.py @@ -0,0 +1,5 @@ +from kolibri.plugins import KolibriPluginBase + + +class KolibriApp(KolibriPluginBase): + kolibri_option_defaults = "options_defaults" diff --git a/src/kolibri_app/options_defaults.py b/src/kolibri_app/options_defaults.py new file mode 100644 index 0000000..d1c5f59 --- /dev/null +++ b/src/kolibri_app/options_defaults.py @@ -0,0 +1,5 @@ +option_defaults = { + "Deployment": { + "HTTP_PORT": 0, + } +}