Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,9 @@ This sample plugin showcases the **Open edX Hooks Extension Framework**, which a
### Option 1: Development with Tutor (Recommended)

```bash
# Backend Plugin Setup
tutor mounts add lms:$PWD/backend:/openedx/sample-plugin-backend
tutor dev launch
tutor dev exec lms pip install -e ../sample-plugin-backend
tutor dev exec lms python manage.py lms migrate
Comment on lines -52 to -53
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these execs wouldn't have persisted through container reboots

tutor dev restart lms
# Backend plugin setup
tutor mounts add "$PWD/backend"
tutor dev launch # Rebuilds image, runs migrations, reboots containers.

# Frontend Plugin Setup (for learner-dashboard MFE development)
npm install $PWD/frontend
Expand Down
9 changes: 8 additions & 1 deletion tutor/tutorsampleplugin/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,17 @@
# ---------------------------------------------------------------------------
# Backend: Install the Django app plugin into LMS and CMS images
# ---------------------------------------------------------------------------

# If a directory named "backend" has been moutned with `tutor mount add`, then
# this line will ensure that the directory gets mapped into the openedx[-dev]
# image and into the container's virtualenv. When there is no such directory
# mounted, this line has no effect (thus it's safe for it to exist in the
# production version of the plugin).
hooks.Filters.MOUNTED_DIRECTORIES.add_item(("openedx", "backend"))

# The openedx-dockerfile-post-python-requirements patch runs after pip
# installs the base Open edX requirements. Plugins installed here are
# available in both LMS and CMS containers.
# ---------------------------------------------------------------------------

hooks.Filters.ENV_PATCHES.add_item((
"openedx-dockerfile-post-python-requirements",
Expand Down
Loading