Skip to content

Commit

Permalink
chore: add devstack.py file in dockerfiles (#54)
Browse files Browse the repository at this point in the history
* chore: pull devstack.py file from updated reference
  • Loading branch information
huniafatima-arbi authored Nov 21, 2024
1 parent 519a483 commit 62b4cb1
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 4 deletions.
2 changes: 2 additions & 0 deletions dockerfiles/course-discovery.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ CMD gunicorn --bind=0.0.0.0:8381 --workers 2 --max-requests=1000 -c course_disco

FROM app AS dev

RUN curl -L -o ${DISCOVERY_CODE_DIR}/course_discovery/settings/devstack.py https://raw.githubusercontent.com/edx/devstack/master/py_configuration_files/course-discovery.py

ENV DJANGO_SETTINGS_MODULE "course_discovery.settings.devstack"

RUN pip install -r ${DISCOVERY_CODE_DIR}/requirements/django.txt
Expand Down
3 changes: 3 additions & 0 deletions dockerfiles/credentials.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ CMD gunicorn --workers=2 --name credentials -c /edx/app/credentials/credentials/
# able to update requirements and generally run things as root.
FROM base AS dev
USER root

RUN curl -L -o credentials/settings/devstack.py https://raw.githubusercontent.com/edx/devstack/master/py_configuration_files/credentials.py

ENV DJANGO_SETTINGS_MODULE credentials.settings.devstack

Check warning on line 102 in dockerfiles/credentials.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
RUN pip install -r /edx/app/credentials/credentials/requirements/dev.txt
RUN make pull_translations
Expand Down
2 changes: 2 additions & 0 deletions dockerfiles/ecommerce.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,6 @@ RUN touch ${ECOMMERCE_APP_DIR}/ecommerce_env
# every time any bit of code is changed.
RUN curl -L https://github.com/openedx/ecommerce/archive/refs/heads/2u/main.tar.gz | tar -xz --strip-components=1

RUN curl -L -o ${ECOMMERCE_CODE_DIR}/ecommerce/settings/devstack.py https://raw.githubusercontent.com/edx/devstack/master/py_configuration_files/ecommerce.py

CMD while true; do python ./manage.py runserver 0.0.0.0:18130; sleep 2; done

Check warning on line 93 in dockerfiles/ecommerce.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/
2 changes: 2 additions & 0 deletions dockerfiles/edx-analytics-dashboard.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ RUN pip install --no-cache-dir -r requirements/production.txt

RUN curl -L https://github.com/edx/edx-analytics-dashboard/archive/refs/heads/master.tar.gz | tar -xz --strip-components=1

RUN curl -L -o ${INSIGHTS_CODE_DIR}/analytics_dashboard/settings/devstack.py https://raw.githubusercontent.com/edx/devstack/master/py_configuration_files/course-discovery.py

RUN nodeenv ${INSIGHTS_NODEENV_DIR} --node=18.20.2 --prebuilt \
&& npm install -g [email protected]

Expand Down
4 changes: 3 additions & 1 deletion dockerfiles/edx-analytics-data-api.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ CMD ["gunicorn" , "-b", "0.0.0.0:8100", "--pythonpath", "/edx/app/analytics_api/

FROM base AS dev

ENV DJANGO_SETTINGS_MODULE="analyticsdataserver.settings.devstack"
RUN curl -L -o ${ANALYTICS_API_CODE_DIR}/analyticsdataserver/settings/devstack.py https://raw.githubusercontent.com/edx/devstack/master/py_configuration_files/analytics_data_api.py

ENV DJANGO_SETTINGS_MODULE "analyticsdataserver.settings.devstack"

RUN curl -L -o requirements/dev.txt https://raw.githubusercontent.com/edx/edx-analytics-data-api/master/requirements/dev.txt

Expand Down
4 changes: 3 additions & 1 deletion dockerfiles/edx-notes-api.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ EXPOSE 8120

FROM app AS dev

ENV DJANGO_SETTINGS_MODULE="notesserver.settings.devstack"
RUN curl -L -o ${NOTES_VENV_DIR}/notesserver/settings/devstack.py https://raw.githubusercontent.com/edx/devstack/master/py_configuration_files/edx_notes_api.py

ENV DJANGO_SETTINGS_MODULE "notesserver.settings.devstack"

# Backwards compatibility with devstack
RUN touch "${COMMON_APP_DIR}/edx_notes_api_env"
Expand Down
4 changes: 3 additions & 1 deletion dockerfiles/registrar.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ RUN pip install --no-cache-dir -r ${REGISTRAR_CODE_DIR}/requirements/devstack.tx
# cloning the repository after requirements installation
RUN curl -L https://github.com/edx/registrar/archive/refs/heads/master.tar.gz | tar -xz --strip-components=1

ENV DJANGO_SETTINGS_MODULE=registrar.settings.devstack
RUN curl -L -o ${REGISTRAR_CODE_DIR}/registrar/settings/devstack.py https://raw.githubusercontent.com/edx/devstack/master/py_configuration_files/registrar.py

ENV DJANGO_SETTINGS_MODULE registrar.settings.devstack

Check warning on line 88 in dockerfiles/registrar.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

CMD while true; do python ./manage.py runserver 0.0.0.0:18734; sleep 2; done

Check warning on line 90 in dockerfiles/registrar.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/

Expand Down
4 changes: 3 additions & 1 deletion dockerfiles/xqueue.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ RUN pip install -r ${XQUEUE_CODE_DIR}/requirements/dev.txt
# cloning git repo
RUN curl -L https://github.com/openedx/xqueue/archive/refs/heads/master.tar.gz | tar -xz --strip-components=1

ENV DJANGO_SETTINGS_MODULE=xqueue.devstack
RUN curl -L -o ${XQUEUE_CODE_DIR}/xqueue/devstack.py https://raw.githubusercontent.com/edx/devstack/master/py_configuration_files/xqueue.py

ENV DJANGO_SETTINGS_MODULE xqueue.devstack

Check warning on line 51 in dockerfiles/xqueue.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

CMD while true; do python ./manage.py runserver 0.0.0.0:8040; sleep 2; done

Check warning on line 53 in dockerfiles/xqueue.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/

Expand Down

0 comments on commit 62b4cb1

Please sign in to comment.