Unable to bind mount containers

I’m trying to bind mount containers to the local edx-platform directory, I followed the documentation:
$ tutor mounts add /home/smadi/openedx/edx-platform
but the tutor mounts list doesn’t show cms and lms containers mounted.
(tutor-venv) smadi@AmjadLaptop:~/openedx/edx-platform$ tutor mounts list

  • name: /home/smadi/openedx/edx-platform
    build_mounts:
    • image: openedx
      context: edx-platform
    • image: openedx-dev
      context: edx-platform
      compose_mounts:
    • service: openedx
      container_path: /openedx/edx-platform

is it because it is running in a virtual environment?

the openedx image represents both the lms and cms as far as i know.

Yes I know, this is what I mean, isn’t running the mount openedx command supposed to mount all containers (LMS, lms-worker, lms-job, CMS , cms-worker, cms-job) and they should show up in compose mounts when running tutor mounts list?
What am I doing wrong?

did you build the image and run the platform? The above format is implicit mount and will take care of auto-magically mounting the directory across containers.

Yes I’ve successfully built the image and the platform is running normally, but if I make changes in the code in my local fork it doesn’t have any effect on the running containers. From what I understood in documentation if the containers were correctly mounted when running the platform any changes in the local fork should be show instantly. Am I missing something?

You may need to do ‘tutor config save’ and/or ‘tutor restart’ for your changes to take effect

I did restart, I also stopped the running containers and started them up again but no use. Still any changes made to the local fork are not reflected in the dev containers, even though the files inside the containers are showing that they were modified and the they seem to be mounted correctly when using the implicit bind-mount command. But still changes are not reflected when running tutor dev start.
If anyone has any idea what am I missing, please share. I would really appreciate it.

Which tutor version are you using? What happens if you use launch instead of start?

I’m using the latest Tutor 18.1.0 and running Redwood. I forked the edx-platform rep and cloned to a local directory, then checkedout the latest release tag open-release/redwood.1
I edited the config.yml file and pointed the EDX_PLATFORM_REPOSITORY to my forked repo and EDX_PLATFORM_VERSION to open-release/redwood.1
I also mounted the edx-platform using:
tutor mounts add ./edx-platform

When running tutor dev launch the openedx image gets rebuilt and takes about 20 minutes then the containers are started and the the platform seems to be running normally. But any changes to the local fork are not hot reloaded in the running containers, even though the container files are showing that they have been modified when viewing container details in docker desktop

Thanks for the context, I will check and let you know.

It seems there is something wrong with platform mount. Container needs to be stopped and started for the changes to reflect.
Can you file an issue on Issues · overhangio/tutor · GitHub, please? Thank you

Hi @smadi,
Could you please tell me which files you are trying to change? If those are HTML templates, then there will be a cache issue (browser cache). The same goes for styling files (Scss files). If it’s about Python files, then tutor restart should help.

I’ll do that. Thank you.

I was actually trying to change an HTML template, so do I have to empty the browser’s cache for the changes to show? I didn’t know that.
So you’re saying that if it’s a change in a file concerned with the frontend there will be a browser cache issue, but for backend code changes tutor restart will be directly reflected in the running the containers?

Yes, you need to empty the browser cache. Sometimes, even that doesn’t work. Then I open incognito and try that. That works and makes you realize that simple chrome shows LMS cache pages and incognito shows the latest one.

Yes, there are cache issues in the case of the frontend. For backend, there is no such issue and everything works on tutor restart.

Thanks to all of you who replied. Your support and guidance is really appreciated.

1 Like