Skip to content

Commit

Permalink
feat: atlas in dockerfile (#2412)
Browse files Browse the repository at this point in the history
* pulling translations on docker build

FIXES: APER-3312
  • Loading branch information
deborahgu authored Mar 20, 2024
1 parent d5c1a02 commit 2824abd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV DJANGO_SETTINGS_MODULE credentials.settings.production
ENV OPENEDX_ATLAS_PULL true
ENV CREDENTIALS_CFG "minimal.yml"

EXPOSE 18150
RUN useradd -m --shell /bin/false app
Expand Down Expand Up @@ -70,6 +72,9 @@ RUN mkdir -p /edx/var/log
# bust the image cache
COPY . /edx/app/credentials/credentials

# Fetch the translations into the image once the Makefile's in place
RUN make pull_translations

# Install dependencies in node_modules directory
RUN npm install --no-save
ENV NODE_BIN=/edx/app/credentials/credentials/node_modules
Expand All @@ -93,6 +98,7 @@ FROM base as dev
USER root
ENV DJANGO_SETTINGS_MODULE credentials.settings.devstack
RUN pip install -r /edx/app/credentials/credentials/requirements/dev.txt
RUN make pull_translations

# Temporary compatibility hack while devstack is supporting
# both the old `edxops/credentials` image and this image:
Expand Down
9 changes: 9 additions & 0 deletions minimal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# WARNING: Experimental
#
# This is the minimal settings you need to set to be able to get django to
# load when using the production.py settings files. It's useful to point
# CREDENTIALS_CFG to this file to be able to run various commands
# without needing a full docker setup.
---

SECRET_KEY: dummy secret key

0 comments on commit 2824abd

Please sign in to comment.