From 5929fef3bddca6664e54323a3afeddef06935ed4 Mon Sep 17 00:00:00 2001 From: Omar Al-Ithawi Date: Wed, 2 Aug 2023 09:07:00 +0300 Subject: [PATCH] feat: add minimal `atlas` step to the build This contribution is part of the [FC-0012 project](https://openedx.atlassian.net/l/cp/XGS0iCcQ) which is sparked by the [Translation Infrastructure update OEP-58](https://open-edx-proposals.readthedocs.io/en/latest/architectural-decisions/oep-0058-arch-translations-management.html#specification). --- .../templates/discovery/build/discovery/Dockerfile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tutordiscovery/templates/discovery/build/discovery/Dockerfile b/tutordiscovery/templates/discovery/build/discovery/Dockerfile index 92fa176..003edf0 100644 --- a/tutordiscovery/templates/discovery/build/discovery/Dockerfile +++ b/tutordiscovery/templates/discovery/build/discovery/Dockerfile @@ -60,9 +60,14 @@ RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/openedx/.cache/pip, # Use redis as a django cache https://pypi.org/project/django-redis/ django-redis==5.2.0 \ # uwsgi server https://pypi.org/project/uWSGI/ - uwsgi==2.0.21 + uwsgi==2.0.21 \ + # Open edX Atlas tranlsation management tool https://pypi.org/project/openedx-atlas/ + openedx-atlas==0.4.4 + +# Update i18n and collect static assets +RUN find course_discovery/conf/locale -mindepth 1 -delete # Removes stale translations +RUN atlas pull {{ patch("atlas-extra-args") }} translations/course-discovery/course_discovery/conf/locale:course_discovery/conf/locale -# Collect static assets COPY --chown=app:app assets.py ./course_discovery/settings/assets.py RUN DJANGO_SETTINGS_MODULE=course_discovery.settings.assets make static