Skip to content

Abstract-Tech/community-theme-tutor

Repository files navigation

Installation and local development

If you are using direnv, activate the virtualenv with:

direnv allow

Otherwise create and activate a Python virtualenv with your favourite library. Then setup requirements and prime the databases (required just the first time) with:

git submodule update --init
pip install -U -r requirements.txt
tutor config save
tutor dev do init

Start/stop services with:

tutor dev start
tutor dev stop

Example services endpoints for the development environment:

Example services endpoints for the production like environment:

Add admin user

tutor dev do createuser --staff --superuser admin admin@example.com

Running an MFE in development mode

To run an MFE in development mode, you would need to clone it and to mount it's directory

Assuming you need to modify frontend-app-account.

  1. Clone it if it's not already
  2. npm install make sure you are on the correct node version node --version it shall match cat .nvmrc
  3. tutor mounts add "./mfe/frontend-app-account".

How do I override specific npm pks?

The following is an example of overriding a header

  1. Clone it if it's not already
  2. npm install make sure you are on the correct node version node --version it shall match cat .nvmrc
  3. Mount the pkg to the container tutor mounts add "account:./mfe/frontend-component-header:/openedx/frontend-component-header" scheme: service:host_path:containter_path
  4. mounts the module.config.js file, assuming it's mfe/, tutor mounts add account:./mfe/module.config.js:/openedx/app/module.config.js
  5. then run npm install Note: in step 2 we run it inside header, now inside account mfe
  6. Simliar to adding the header we can also add other pkgs, like footer, brand, paragon...etc.
  7. tutor dev start -d to apply changes

Building and runnning MFEs in production mode

If you want to test the MFEs in a production like environment (e.g. the platform root page will be replaced by the Home MFE application) you can do so by running:

tutor images build mfe
tutor local start mfe caddy

Features to implement

  1. Register MFE images to build on dev instance to eliminate the need to build them by hand. Reference: https://github.com/overhangio/tutor-ecommerce/blob/87aedf98c9e8214c4e05958a812946ba90135de4/tutorecommerce/plugin.py#L161
  2. MFE image building cache invalidation (after Palm). Reference: https://github.com/overhangio/tutor-mfe/commit/584d1e092ee6693e20b66d450b14c83666a5a5e3

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published