Hey @erickhgm,
Thanks for the proposal, I’m totally up for it. May I suggest that you name the patch “edx-platform-docker-entrypoint” “openedx-dockerfile-entrypoint”? Also, maybe wait for this PR to be merged such that you can easily document this patch.
Wait, actually: I’m currently in the process of getting rid of the edx-platform entrypoint altogether. Is it ok for you to define your custom entrypoints elsewhere? For instance:
As docker-compose.yml arguments.
By implementing one of the existing openedx-dockerfile-* patches.
Yeah, I’m able to use it, but I need to understand how things will work in v1 to adapt it.
If the line with ENTRYPOINT [“docker-entrypoint.sh”] won’t exist anymore, prolably I will keep the entrypoint using a patch, put all commands in docker-compose command/arguments doesn’t look very nice.
Don’t worry, when the v1 is available I will check and see if my needs have been met. If I have a contribution I let you know.
Hello @regis, the Plugins v1 was a great upgrade!
I’m analyzing all the changes to understand and upgrade my Open edX instance.
But continuing with the question about the docker-entrypoint.sh …
I was taking a look at the commit get rid of the openedx Docker entrypoint and I liked it!
Removing the DJANGO_SETTINGS_MODULE from the docker-entrypoint.sh was good, when I first tried to run a command in LMS/CMS container instance I spent a time finding the reason ./manage.py commands weren’t working. But in the end, I noticed that I need to set the DJANGO_SETTINGS_MODULE environment variable.
However, I think would be useful if we keep the docker-entrypoint.sh but without the line below.
With this will be easy to add any script or code before Open edX starts and as we don’t have the DJANGO_SETTINGS_MODULE being set there, this won’t be a problem like before.
I think that if you need to modify the “production” stage of the openedx Docker image then you need to insert a {{ patch(...) }} statement at the very bottom of the Dockerfile. Would you like to open a PR?
(note that it’s better to have that patch after the CMD statement, because it allows you to override it. CMD statements may be placed anywhere in the Dockerfile, but only the last one is taken into account)
What you are describing seems totally doable without any further change to Tutor core itself, outside from merging that PR. It used to be impossible with the v0 plugin API, because you could not render plugin files to arbitrary folders. But now, with the plugin v1 API you can render your docker-entrypoint.sh right next to the openedx Dockerfile.