Skip to content

Commit 40ccc87

Browse files
committed
build: Simplify tutor initialization
1 parent c197961 commit 40ccc87

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,9 @@ This sample plugin showcases the **Open edX Hooks Extension Framework**, which a
4646
### Option 1: Development with Tutor (Recommended)
4747

4848
```bash
49-
# Backend Plugin Setup
50-
tutor mounts add lms:$PWD/backend:/openedx/sample-plugin-backend
51-
tutor dev launch
52-
tutor dev exec lms pip install -e ../sample-plugin-backend
53-
tutor dev exec lms python manage.py lms migrate
54-
tutor dev restart lms
49+
# Backend plugin setup
50+
tutor mounts add "$PWD/backend"
51+
tutor dev launch # Rebuilds image, runs migrations, reboots containers.
5552

5653
# Frontend Plugin Setup (for learner-dashboard MFE development)
5754
npm install $PWD/frontend

tutor/tutorsampleplugin/plugin.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,14 @@
2121
# ---------------------------------------------------------------------------
2222
# Backend: Install the Django app plugin into LMS and CMS images
2323
# ---------------------------------------------------------------------------
24+
25+
# If a directory named "backend" has been bind-mounted, then map it into
26+
# the openedx image. It will automatically be placed at /mnt/backend
27+
hooks.Filters.MOUNTED_DIRECTORIES.add_item(("openedx", "backend"))
28+
2429
# The openedx-dockerfile-post-python-requirements patch runs after pip
2530
# installs the base Open edX requirements. Plugins installed here are
2631
# available in both LMS and CMS containers.
27-
# ---------------------------------------------------------------------------
2832

2933
hooks.Filters.ENV_PATCHES.add_item((
3034
"openedx-dockerfile-post-python-requirements",

0 commit comments

Comments
 (0)