Skip to content

Commit

Permalink
feat: add minimal atlas step to the build
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
OmarIthawi committed Aug 16, 2023
1 parent 286acda commit 112f868
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 2 additions & 0 deletions tutordiscovery/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
"OAUTH2_KEY_SSO_DEV": "discovery-sso-dev",
"CACHE_REDIS_DB": "{{ OPENEDX_CACHE_REDIS_DB }}",
"EXTRA_PIP_REQUIREMENTS": [],
"ATLAS_PULL": False,
"ATLAS_ARGS": "",
},
}

Expand Down
13 changes: 11 additions & 2 deletions tutordiscovery/templates/discovery/build/discovery/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,18 @@ 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'<1.0.0'

# Update i18n and collect static assets
{% if DISCOVERY_ATLAS_PULL %}
RUN find course_discovery/conf/locale -mindepth 1 -maxdepth 1 -type d -exec rm -r {} \; \
&& cd course_discovery/conf \
&& atlas pull {{ DISCOVERY_ATLAS_ARGS }} \
translations/course-discovery/course_discovery/conf/locale:locale
{% endif %}

# Collect static assets
COPY --chown=app:app assets.py ./course_discovery/settings/assets.py
RUN DJANGO_SETTINGS_MODULE=course_discovery.settings.assets make static

Expand Down

0 comments on commit 112f868

Please sign in to comment.