Skip to content

Commit

Permalink
build: add atlas support in discovery docker (#4293)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali-D-Akbar authored Mar 20, 2024
1 parent 73d9c34 commit 99bc9af
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ARG DISCOVERY_CODE_DIR="${DISCOVERY_APP_DIR}/${DISCOVERY_SERVICE_NAME}"
ARG DISCOVERY_NODEENV_DIR="${DISCOVERY_APP_DIR}/nodeenvs/${DISCOVERY_SERVICE_NAME}"

ENV PATH "${DISCOVERY_VENV_DIR}/bin:${DISCOVERY_NODEENV_DIR}/bin:$PATH"
ENV DISCOVERY_CFG "/edx/etc/discovery.yml"
ENV DISCOVERY_CFG "minimal.yml"
ENV DISCOVERY_CODE_DIR "${DISCOVERY_CODE_DIR}"
ENV DISCOVERY_APP_DIR "${DISCOVERY_APP_DIR}"

Expand Down Expand Up @@ -63,6 +63,8 @@ ENV DJANGO_SETTINGS_MODULE "course_discovery.settings.production"

RUN pip install -r ${DISCOVERY_CODE_DIR}/requirements/production.txt

RUN make OPENEDX_ATLAS_PULL=true pull_translations

CMD gunicorn --bind=0.0.0.0:8381 --workers 2 --max-requests=1000 -c course_discovery/docker_gunicorn_configuration.py course_discovery.wsgi:application

FROM app as dev
Expand All @@ -72,6 +74,8 @@ ENV DJANGO_SETTINGS_MODULE "course_discovery.settings.devstack"
RUN pip install -r ${DISCOVERY_CODE_DIR}/requirements/django.txt
RUN pip install -r ${DISCOVERY_CODE_DIR}/requirements/local.txt

RUN make OPENEDX_ATLAS_PULL=true pull_translations

# Devstack related step for backwards compatibility
RUN touch ${DISCOVERY_APP_DIR}/discovery_env

Expand Down
19 changes: 19 additions & 0 deletions minimal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 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
# DISCOVERY_CFG to this file to be able to run various paver commands
# without needing a full docker setup.
#
# Follow up work will likely be done as a part of
# https://github.com/openedx/wg-developer-experience/issues/136
---

SECRET_KEY: dummy secret key
TRACKING_BACKENDS: {}
EVENT_TRACKING_BACKENDS: {}
JWT_AUTH: {}
CELERY_QUEUES: {}
MKTG_URL_LINK_MAP: {}
MKTG_URL_OVERRIDES: {}
REST_FRAMEWORK: {}

0 comments on commit 99bc9af

Please sign in to comment.