Comprehensive theming architecture in Tutor

Hi all,

After a small discussion held in last meeting, I’d like to start this topic about comprehensive theming in Tutor.

Basically the problem is that we make hold many sites in the same LMS, each having its own theme. Thus we make frequent changes in themes and need an agile way to update them.

As discussed, the current procedure would be to test the theme locally, rebuild the image with the new theme and push it to production. Looks like the comprehensive themes is an internal part of the image and needs to be compiled after each change. This would consume a lot of time and effort for -sometimes- small changes.

Someone (sorry I forgot your name) proposed to store static assets in S3 in MinIO. I think it could work for images and CSS, but would not work for page templates. Correct me if I’m wrong. There may be performance issues, but probably can be overcome by a CDN.

@regis mentioned that bind-mount a comprehensive directory is not a possibility. May we reconsider this option? This would allow to store themes outside the image and make dynamic changes.

Btw, I don’t know exactly what will be the future of comprehensive theming in MFE. I am not very familiar with the details and I believe this is a still open discussion.

Any ideas are welcome!

1 Like

Hi @andres one possible approach is to create a custom process to rebuild the image but just with the changes needed to update the theme.

Let’s imagine that you have a CI process to regenerate the image, that process can be customized to perform only the necessary steps to update the theme.

So for example you can have something like this in a custom Dockerfile for changes “only” in themes:

# We are extending tutor openedx image here.
FROM {here-you-should-define-the-image-the-openedx-image-to-update}

# Copy theme from some location to the image.
COPY ./themes/ /openedx/themes/

# update assets for lms
RUN {command-to-update-theme}

Please, consider this just as an idea, the Dockerfile is just an example, nothing formal.


No need create Dockerfile. Can you bindmount lms /openedx/edx-platform

Maybe for testing or dev, but also for production? Can you please detail the process?

My server is all for production, dev.

Interesting… I would like to know @regis opinion about mounting the whole edx-platform instead of having it inside the docker image for production.

Bind-mounting the entire /openedx/edx-platform folder is a possibility, of course. Actually, there is a command for that: Open edX development — Tutor documentation
But if I were you I would really avoid bind-mounting folders from the host. Ideally, your containers are stateless, such that they can be run at scale (in Kubernetes for instance).

If your problem is to have a quick feedback loop to iterate on theme adjustments in production, then I think we can find creative ideas. Kind-of-like what @cacciaresi suggested. I still think that your best bet will be to re-build, push and deploy Docker images; that’s what Docker is good at, after all.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.