I’m working on my first Tutor plugin, feat: adds superset docker services and open edx integrations by pomegranited · Pull Request #1 · open-craft/tutor-contrib-superset · GitHub, which sets up Apache Superset and allows users to use Open edX SSO to authenticate to the app.
To set up SSO, I need to know the full root LMS URL: e.g.
The variable I’m trying to set is here:
I can get the base domain configured from
LMS_HOST, and I can figure out whether it’s http or https from
ENABLE_HTTPS. But I can’t seem to find the variable that tells me whether there’s a port that needs to be added to the hostname.
I’ve tried several things, but nothing has worked with the plugin.py script so far.
- The variable
JWT_COMMON_ISSUERis available when my plugin.py is running, but it only contains the correct value when running
tutor local; it doesn’t get the
:8000port appended for
- Variables like
COMPOSE_PROJECT_NAMEare not available when my plugin.py is running.
- I’m adding patches to
ENV_PATCHES["local-docker-compose-services"], so I thought maybe there was an
ENV_PATCHES["dev-docker-compose-services"]equivalent for dev – doesn’t seem to be?
- I looked at other plugins like tutor-discovery and tutor-ecommerce, and they hardcode the LMS provider URL in their django dev/prod settings file templates. I can’t really do that with my plugin, because Superset doesn’t have a notion of running in dev vs prod environments.
How do other people solve this issue?