Hello everyone,
I’m currently exploring tutor-mfe, and in the /openedx/tutor/env/plugins/mfe/build/mfe
directory, I made changes to the Dockerfile (changed the GitHub link). However, when I run tutor dev launch
, the Dockerfile reverts back to its original state. How can I save the changes to that Dockerfile?
Yagnesh
(Yagnesh Nayi)
May 22, 2023, 10:25am
2
hello @TNS_FX1838 welcome to the openedx community
if you need to make changes such as settings, Dockerfiles,
etc. so u need to create a plugin in tutor and set the value as per your requirement
please read this docs it helps u a lot.
https://docs.tutor.overhang.io/tutorials/plugin.html
Yagnesh
(Yagnesh Nayi)
May 22, 2023, 11:15am
4
oh, please explain what you are doing in question so another person can understand better.
in that case, u don’t need to create a plugin just add this to your config.yml file
LEARNING_MFE_APP:
name: learning
port: 2000
repository: your repo
version: master
you’ll need to rebuild your mfe image:
tutor config save
tutor images build mfe
after u can check in your docker file your fork GitHub repo comes instead default
1 Like
I followed your instructions, but when executing “tutor dev launch” or “tutor dev start,” I encountered an error.
my purpose:
I want to know how I can use my own GitHub repository link (GitHub - sonxauxi2411/frontend-app-learning: Front-end for the Open edX course experience, implemented using React and Paragon. ) instead of the default one (GitHub - openedx/frontend-app-learning: Front-end for the Open edX course experience, implemented using React and Paragon. ) in order to easily modify the code according to my preferences.
Yagnesh
(Yagnesh Nayi)
May 22, 2023, 2:47pm
6
u need to change LEARNING_MFE_APP:
and add this MFE_LEARNING_MFE_APP:
MFE_LEARNING_MFE_APP:
name: learning
port: 2000
repository: your repo path
version: master
I hope it can solve your problem.
arbrandes
(Adolfo R. Brandes)
May 22, 2023, 5:25pm
7
Just to add to @Yagnesh ’s very relevant answers, it is probably a better idea to use the CLI instead of editing config.yml
directly. For example:
tutor config save --set MFE_LEARNING_MFE_APP="{'name': 'learning', 'repository': 'https://github.com/openedx/frontend-app-learning', 'version': 'master', 'port': 2000}"
1 Like
sorry for bothering ,
I have successfully implemented it in the “local” environment, but it doesn’t work in the “dev” environment. Can you tell me why it’s not working, or is it due to incorrect installation?
arbrandes
(Adolfo R. Brandes)
May 23, 2023, 11:42am
10
For the dev environment you’re better off rebuilding all images:
$ tutor images build all
Hello. What if I want to modify tutor mfe’s templates? How can I achieve the same results?