diff --git a/.gitignore b/.gitignore index 5d213d5..06c16eb 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ config/ data-*/ TODO +openedx/requirements/private.* diff --git a/CHANGELOG.md b/CHANGELOG.md index e82461b..979b21d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Changelog +- 2018-1113 [Improvement] Facilitate install of extra XBlocks. Thanks @frob! - 2018-10-30 [Bugfix] Fix rabbitmq restart policy - 2018-10-03 [Improvement/Bugfix] Fix and accelerate Android application build - 2018-10-02 [Improvement] Bump Open edX version to hawthorn.2 diff --git a/README.md b/README.md index b329e83..6f57f11 100644 --- a/README.md +++ b/README.md @@ -252,7 +252,15 @@ The images are built, tagged and uploaded to Docker Hub in one command: make dockerhub -## Troubleshooting +## Help/Troubleshooting + +### How to add extra XBlocks to the LMS/CMS? + +Additional requirements can be added to the `openedx/requirements/private.txt` file. Then, the `openedx` docker image must be rebuilt to include the new requirements. For instance: + + echo "git+https://github.com/open-craft/xblock-poll.git" >> openedx/requirements/private.txt + make build-openedx + make run ### Help! Your containers are eating all my RAM/CPU/CHEESE diff --git a/openedx/Dockerfile b/openedx/Dockerfile index b158c07..15c6c86 100644 --- a/openedx/Dockerfile +++ b/openedx/Dockerfile @@ -47,19 +47,23 @@ RUN ln -s /openedx/config/lms.env.json /openedx/ \ && ln -s /openedx/config/lms.auth.json /openedx/ \ && ln -s /openedx/config/cms.auth.json /openedx/ -VOLUME /openedx/config -VOLUME /openedx/data -VOLUME /openedx/edx-platform - # Dockerize will be useful to wait for mysql DB availability ENV DOCKERIZE_VERSION v0.6.1 RUN curl -L -o dockerize.tar.gz https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ && tar -C /usr/local/bin -xzvf dockerize.tar.gz \ && rm dockerize.tar.gz +# Install private requirements as late as possible, so they can be modified frequently +COPY ./requirements/private.txt /tmp/ +RUN pip install --src ../venv/src -r /tmp/private.txt + # Copy convenient scripts COPY ./bin/docker-entrypoint.sh /usr/local/bin/ +VOLUME /openedx/config +VOLUME /openedx/data +VOLUME /openedx/edx-platform + # service variant is "lms" or "cms" ENV SERVICE_VARIANT lms ENV SETTINGS universal.production diff --git a/openedx/requirements/private.txt b/openedx/requirements/private.txt new file mode 100644 index 0000000..d36f2ba --- /dev/null +++ b/openedx/requirements/private.txt @@ -0,0 +1,3 @@ +# Add your additional requirements here, such as xblocks. This file is not +# under version control, which means that your changes will not be committed to +# the upstream repository.