Skip to content

Commit

Permalink
feat: Add atlas pull to Dockerfile
Browse files Browse the repository at this point in the history
Adding the pull behind a feature flag until it's fully implemented

Refs: FC-0012 OEP-58
  • Loading branch information
shadinaif committed Nov 19, 2023
1 parent 149e1e3 commit eb3625d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions tutorecommerce/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
},
},
},
"ATLAS_PULL": False,
},
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
###### Minimal image with base system requirements for most stages
FROM docker.io/ubuntu:20.04 as minimal

ENV DEBIAN_FRONTEND=noninteractive
RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked{% endif %} \
apt update && \
apt install -y curl git-core language-pack-en
apt install -y curl gettext git-core language-pack-en

###### Checkout code
FROM minimal as checkout
Expand Down Expand Up @@ -79,6 +80,12 @@ RUN cd /openedx/requirements/ \
{% for extra_requirement in ECOMMERCE_EXTRA_PIP_REQUIREMENTS %}RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/openedx/.cache/pip,sharing=shared,uid=${APP_USER_ID} {% endif %}pip install '{{ extra_requirement }}'
{% endfor %}

{% if ECOMMERCE_ATLAS_PULL %}
# Pull translations. Support the OEP-58 proposal behind a feature flag until it's fully implemented.
RUN atlas pull {{ patch("atlas-extra-args") }} translations/ecommerce/ecommerce/conf/locale:ecommerce/conf/locale
RUN python manage.py compilemessages
{% endif %}

# Collect static assets (aka: "make static")
COPY --chown=app:app assets.py ./ecommerce/settings/assets.py
ENV DJANGO_SETTINGS_MODULE ecommerce.settings.assets
Expand Down

0 comments on commit eb3625d

Please sign in to comment.