Backend code customization code how to run in tutor

Help Needed: LMS Container Crashing After Adding Volume Mounts

  • What I’m Trying to Do

    I’m developing a custom Django app (rayyan_api) for Open edX and trying to set up local development with live code syncing using Tutor’s docker-compose override.

    My Setup

    Local Directory Structure:

    ~/.local/share/tutor/modules/openedx-workspace/edx-platform/lms/djangoapps/health_api/

  • views.py health api write it

  • urls.py endpoint

    edx-platform/lms/urls.py

    Health API urls

    urlpatterns += [

    path('api/health/v1/', include(('lms.djangoapps.health_api.urls', 'lms.djangoapps.health_api'), namespace='health_api'))
    

    ]
    this is checking purpose manually running is wokring but tutor we got some error

    Docker Compose Override (~/.local/share/tutor/env/dev/docker-compose.override.yml):
    yaml
    version: “3”

    services:
    lms:
    volumes:

    Mount custom app

    • /home/ubuntu/.local/share/tutor/modules/openedx-workspace/edx-platform/lms/djangoapps/rayyan_api:/openedx/edx-platform/lms/djangoapps/rayyan_api:cached
      # Mount envs for settings changes
      - /home/ubuntu/.local/share/tutor/modules/openedx-workspace/edx-platform/lms/envs:/openedx/edx-platform/lms/envs:cached
    
    working_dir: /openedx/edx-platform
    

    The Problem

    After adding the docker-compose override, the LMS container crashes on startup with this error:

    ModuleNotFoundError: No module named ‘openedx.core.lib.features_setting_proxy’

    Full Error Trace:

    File “/openedx/edx-platform/lms/envs/tutor/development.py”, line 3, in
    from lms.envs.devstack import *
    File “/openedx/edx-platform/lms/envs/devstack.py”, line 17, in
    from openedx.core.lib.features_setting_proxy import FeaturesProxy
    ModuleNotFoundError: No module named ‘openedx.core.lib.features_setting_proxy’

    What’s Working

    • Without the override, LMS runs fine
    • The rayyan_api directory exists in the local path
    • The volume mounts are being applied (verified paths exist)

    What I’ve Tried

    • Verified local directory structure matches container paths
    • Confirmed docker-compose.override.yml syntax is correct

    Questions

    1. Is mounting /lms/envs causing the issue? Should I only mount my custom app directory?
    2. Are there missing dependencies in my local workspace that exist in the container?
    3. What’s the correct approach for mounting custom Django apps in Tutor dev mode?
    4. Should I be using a plugin approach instead of direct volume mounts?

    Environment

    • Tutor (dev mode)
    • Open edX platform
    • Container: tutor_dev-lms-1
  • this is the purpose for change the code

    I cloned the edx-platform from GitHub and ran it successfully without Tutor. After that, I integrated it into my web application.

    My web app embeds the entire LMS system inside an iframe. I also implemented login bypass using a FastAPI service, including custom login and registration API logic. The FastAPI service logs users into Open edX by fetching the CSRF token and session cookies.

    I modified some Open edX logic so that:

    • Every user becomes a verified user automatically

    • The enrollment API no longer triggers ecommerce service calls

    • Course certification is integrated with my web app

    • When the user completes a course, they click a “Request Certificate” button in my app

    • My app then calls a custom API to generate the certificate and store the data in my own database

    All of this works correctly when running Open edX without Tutor, including the MFEs

@Suriya_Stark - we need more details in order to help you. Could you edit your post:

  • What version of Tutor are you running?
  • What have you actually done - what steps/tutorials have you followed? What code/commands are you entering? What output have you gotten?

I’ve also recategorized your post in our Site Operators category instead of Community.

ok i edit my post

pls check it i edit my post

@Suriya_Stark From the paths you have used for your volume mounts, it looks like you are developing your Django app inside the edx-platform repository itself. I am guessing in your personal fork of the edx-platform.

If that’s the case, I would recommend developing your app as a plugin - see docs here. This has the advantages of:

  • not having to fork edx-platform and keep it in sync
  • mount and install the plugin cleanly inside the containers for live editing

Once you have your app structured as a plugin, then developing it with Tutor is very similar to this guide - Working on edx-platform Python dependencies. In short, use tutor mounts to add your repo, build the image and restart servicves. You can sometimes even shortcut building images and install it directly using tutor dev dc exec bash followed by pip install -e /mnt/my-plugin.