6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-12-13 06:37:46 +00:00

Make it possible to patch build templates

Thus, build templates are no longer copied, but rendered.
This commit is contained in:
Régis Behmo 2019-07-04 16:45:15 +08:00
parent ff36ddb2d7
commit cb49bfd814
3 changed files with 6 additions and 2 deletions

View File

@ -4,6 +4,7 @@ Note: Breaking changes between versions are indicated by "💥".
## Latest
- [Feature] Make it possible for plugins to patch the build templates
- [Improvement] Move Xqueue and Student notes to a dedicated plugin
## 3.4.3 (2019-06-24)

View File

@ -102,11 +102,10 @@ def render_full(root, config):
"""
Render the full environment, including version information.
"""
for subdir in ["android", "apps", "k8s", "local", "webui"]:
for subdir in ["android", "apps", "build", "k8s", "local", "webui"]:
save_subdir(subdir, root, config)
for plugin, path in plugins.iter_templates(config):
save_plugin_templates(plugin, path, root, config)
copy_subdir("build", root)
save_file(VERSION_FILENAME, root, config)
save_file("kustomization.yml", root, config)

View File

@ -69,6 +69,8 @@ COPY settings/cms/*.py ./cms/envs/tutor/
COPY ./bin /openedx/bin
ENV PATH /openedx/bin:${PATH}
{{ patch("openedx-dockerfile-pre-assets") }}
# Collect production assets. By default, only assets from the default theme
# will be processed. This makes the docker image lighter and faster to build.
# Only the custom themes added to /openedx/themes will be compiled.
@ -91,6 +93,8 @@ RUN mkdir /openedx/data
ENV SERVICE_VARIANT lms
ENV SETTINGS tutor.production
{{ patch("openedx-dockerfile") }}
# Entrypoint will fix permissions of all files and run commands as openedx
ENTRYPOINT ["docker-entrypoint.sh"]