7
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-06-14 11:32:20 +00:00

Merge branch 'master' into nightly

This commit is contained in:
Régis Behmo 2021-11-30 12:51:18 +01:00
commit e9e1df9e70
4 changed files with 31 additions and 4 deletions

View File

@ -5,6 +5,7 @@ Note: Breaking changes between versions are indicated by "💥".
## Unreleased
- [Bugfix] Remove trailing slashes in docker-compose files for [compatibility with docker-compose v2 in WSL](https://github.com/docker/compose/issues/8558).
- [Improvement] `settheme` now works with preview domain.
- [Feature] Allow specifying extra pip packages through config.yml.
## v12.1.7 (2021-11-18)

View File

@ -91,6 +91,12 @@ By default there are 2 `uwsgi worker processes <https://uwsgi-docs.readthedocs.i
These two configuration parameters define which redis database to use for Open edX cache and celery task.
.. _openedx_extra_pip_requirements:
- ``OPENEDX_EXTRA_PIP_REQUIREMENTS`` (default: ``openedx-scorm-xblock<13.0.0,>=12.0.0``)
This defines extra pip packages that are going to be installed for Open edX.
Vendor services
~~~~~~~~~~~~~~~
@ -222,14 +228,32 @@ See :ref:`the corresponding tutorial <theming>`.
Installing extra xblocks and requirements
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Would you like to include custom xblocks, or extra requirements to your Open edX platform? Additional requirements can be added to the ``env/build/openedx/requirements/private.txt`` file. For instance, to include the `polling xblock from Opencraft <https://github.com/open-craft/xblock-poll/>`_::
Would you like to include custom xblocks, or extra requirements to your Open edX platform? Additional requirements can be added to the ``OPENEDX_EXTRA_PIP_REQUIREMENTS`` parameter in the :ref:`config file <configuration>` or to the ``env/build/openedx/requirements/private.txt`` file. The difference between them, is that ``private.txt`` file, even though it could be used for both, :ref:`should be used for installing extra xblocks or requirements from private repositories <extra_private_xblocks>`. For instance, to include the `polling xblock from Opencraft <https://github.com/open-craft/xblock-poll/>`_:
- add the following to the ``config.yml``::
OPENEDX_EXTRA_PIP_REQUIREMENTS:
- "git+https://github.com/open-craft/xblock-poll.git"
.. warning::
Specifying extra requirements through ``config.yml`` overwrites :ref:`the default extra requirements<openedx_extra_pip_requirements>`. You might need to add them to the list, if your configuration depends on them.
- or add the dependency to ``private.txt``::
echo "git+https://github.com/open-craft/xblock-poll.git" >> "$(tutor config printroot)/env/build/openedx/requirements/private.txt"
Then, the ``openedx`` docker image must be rebuilt::
tutor images build openedx
.. _extra_private_xblocks:
Installing extra requirements from private repositories
*******************************************************
When installing extra xblock or requirements from private repositories, ``private.txt`` file should be used, because it allows to install dependencies without adding git credentials to the Docker image. By adding your git credentials to the Docker image, you're risking leaking your git credentials, if you were to publish (intentionally or unintentionally) the Docker image in a public place.
To install xblocks from a private repository that requires authentication, you must first clone the repository inside the ``openedx/requirements`` folder on the host::
git clone git@github.com:me/myprivaterepo.git "$(tutor config printroot)/env/build/openedx/requirements/myprivaterepo"

View File

@ -78,9 +78,6 @@ RUN pip install setuptools==44.1.0 pip==20.3.4 wheel==0.37.0
# Install base requirements
RUN pip install -r ./requirements/edx/base.txt
# Install scorm xblock
RUN pip install "openedx-scorm-xblock<13.0.0,>=12.0.0"
# Install django-redis for using redis as a django cache
RUN pip install django-redis==5.0.0
@ -95,6 +92,9 @@ RUN cd /openedx/requirements/ \
&& touch ./private.txt \
&& pip install -r ./private.txt
{% for extra_requirements in OPENEDX_EXTRA_PIP_REQUIREMENTS %}RUN pip install '{{ extra_requirements }}'
{% endfor %}
###### Install nodejs with nodeenv in /openedx/nodeenv
FROM python as nodejs-requirements
ENV PATH /openedx/nodeenv/bin:/openedx/venv/bin:${PATH}

View File

@ -61,6 +61,8 @@ OPENEDX_MYSQL_DATABASE: "openedx"
OPENEDX_CSMH_MYSQL_DATABASE: "{{ OPENEDX_MYSQL_DATABASE }}_csmh"
OPENEDX_MYSQL_USERNAME: "openedx"
OPENEDX_COMMON_VERSION: "master"
OPENEDX_EXTRA_PIP_REQUIREMENTS:
- "openedx-scorm-xblock<13.0.0,>=12.0.0"
MYSQL_HOST: "mysql"
MYSQL_PORT: 3306
MYSQL_ROOT_USERNAME: "root"