From 3efb82571be6a63343435857dd7fecffda309908 Mon Sep 17 00:00:00 2001 From: Hunia Fatima Date: Wed, 30 Oct 2024 00:03:18 +0500 Subject: [PATCH 01/18] chore: resolve github warnings raised in dockerfile (#47) remove unfied workflow Co-authored-by: Muhammad Farhan <129956601+mfarhan943@users.noreply.github.com> --- dockerfiles/commerce-coordinator.Dockerfile | 10 +++---- dockerfiles/course-discovery.Dockerfile | 9 +++--- dockerfiles/credentials.Dockerfile | 16 +++++------ dockerfiles/ecommerce.Dockerfile | 6 ++-- .../edx-analytics-dashboard.Dockerfile | 28 +++++++++---------- dockerfiles/edx-analytics-data-api.Dockerfile | 26 ++++++++--------- dockerfiles/edx-exams.Dockerfile | 2 +- dockerfiles/edx-notes-api.Dockerfile | 18 ++++++------ dockerfiles/enterprise-access.Dockerfile | 1 - dockerfiles/enterprise-catalog.Dockerfile | 6 ++-- dockerfiles/enterprise-subsidy.Dockerfile | 14 +++++----- dockerfiles/portal-designer.Dockerfile | 4 +-- .../program-intent-engagement.Dockerfile | 10 +++---- dockerfiles/registrar.Dockerfile | 20 ++++++------- dockerfiles/xqueue.Dockerfile | 16 +++++------ 15 files changed, 93 insertions(+), 93 deletions(-) diff --git a/dockerfiles/commerce-coordinator.Dockerfile b/dockerfiles/commerce-coordinator.Dockerfile index 0058554..244f6fa 100644 --- a/dockerfiles/commerce-coordinator.Dockerfile +++ b/dockerfiles/commerce-coordinator.Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:focal as app +FROM ubuntu:focal AS app MAINTAINER sre@edx.org @@ -37,11 +37,11 @@ RUN rm -rf /var/lib/apt/lists/* RUN ln -s /usr/bin/python3 /usr/bin/python RUN locale-gen en_US.UTF-8 -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 +ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US:en +ENV LC_ALL=en_US.UTF-8 -ENV DJANGO_SETTINGS_MODULE commerce_coordinator.settings.production +ENV DJANGO_SETTINGS_MODULE=commerce_coordinator.settings.production EXPOSE 8140 diff --git a/dockerfiles/course-discovery.Dockerfile b/dockerfiles/course-discovery.Dockerfile index 89a1709..fc4725b 100644 --- a/dockerfiles/course-discovery.Dockerfile +++ b/dockerfiles/course-discovery.Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:focal as app +FROM ubuntu:focal AS app ARG PYTHON_VERSION=3.12 @@ -75,7 +75,7 @@ RUN npm install --production && ./node_modules/.bin/bower install --allow-root - # Expose canonical Discovery port EXPOSE 8381 -FROM app as prod +FROM app AS prod ENV DJANGO_SETTINGS_MODULE "course_discovery.settings.production" @@ -85,7 +85,7 @@ RUN DISCOVERY_CFG=minimal.yml OPENEDX_ATLAS_PULL=true make 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 +FROM app AS dev ENV DJANGO_SETTINGS_MODULE "course_discovery.settings.devstack" @@ -101,6 +101,7 @@ CMD while true; do python ./manage.py runserver 0.0.0.0:8381; sleep 2; done ########################################################### # Define k8s target -FROM prod as kubernetes + +FROM prod AS kubernetes ENV DISCOVERY_SETTINGS='kubernetes' ENV DJANGO_SETTINGS_MODULE="course_discovery.settings.$DISCOVERY_SETTINGS" diff --git a/dockerfiles/credentials.Dockerfile b/dockerfiles/credentials.Dockerfile index 71ecafb..3f78a4e 100644 --- a/dockerfiles/credentials.Dockerfile +++ b/dockerfiles/credentials.Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:focal as base +FROM ubuntu:focal AS base # System requirements # - git; Used to pull in particular requirements from github rather than pypi, @@ -35,12 +35,12 @@ ENV PATH="$NODE_ENV/bin:$PATH" RUN npm install -g npm@9.x.x RUN locale-gen en_US.UTF-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" +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 @@ -94,7 +94,7 @@ CMD gunicorn --workers=2 --name credentials -c /edx/app/credentials/credentials/ # We don't switch back to the app user for devstack because we need devstack users to be # able to update requirements and generally run things as root. -FROM base as dev +FROM base AS dev USER root ENV DJANGO_SETTINGS_MODULE credentials.settings.devstack RUN pip install -r /edx/app/credentials/credentials/requirements/dev.txt diff --git a/dockerfiles/ecommerce.Dockerfile b/dockerfiles/ecommerce.Dockerfile index cd1926e..3e6a571 100644 --- a/dockerfiles/ecommerce.Dockerfile +++ b/dockerfiles/ecommerce.Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:focal as app +FROM ubuntu:focal AS app ENV DEBIAN_FRONTEND noninteractive # System requirements. @@ -55,7 +55,7 @@ RUN npm install --production && ./node_modules/.bin/bower install --allow-root - # Expose canonical ecommerce port EXPOSE 18130 -FROM app as prod +FROM app AS prod ENV DJANGO_SETTINGS_MODULE "ecommerce.settings.production" @@ -71,7 +71,7 @@ RUN curl -L https://github.com/edx/ecommerce/archive/refs/heads/2u/main.tar.gz | CMD gunicorn --bind=0.0.0.0:18130 --workers 2 --max-requests=1000 -c ecommerce/docker_gunicorn_configuration.py ecommerce.wsgi:application -FROM app as dev +FROM app AS dev ENV DJANGO_SETTINGS_MODULE "ecommerce.settings.devstack" diff --git a/dockerfiles/edx-analytics-dashboard.Dockerfile b/dockerfiles/edx-analytics-dashboard.Dockerfile index 6dd5d8c..da92fac 100644 --- a/dockerfiles/edx-analytics-dashboard.Dockerfile +++ b/dockerfiles/edx-analytics-dashboard.Dockerfile @@ -1,6 +1,6 @@ -FROM ubuntu:focal as app +FROM ubuntu:focal AS app -ENV DEBIAN_FRONTEND noninteractive +ENV DEBIAN_FRONTEND=noninteractive ARG PYTHON_VERSION=3.8 @@ -30,23 +30,23 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* RUN locale-gen en_US.UTF-8 -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 +ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US:en +ENV LC_ALL=en_US.UTF-8 # ENV variables lifetime is bound to the container whereas ARGS variables lifetime is bound to the image building process only # Also ARGS provide us an option of compatibility of Path structure for Tutor and other OpenedX installations -ARG COMMON_CFG_DIR "/edx/etc" +ARG COMMON_CFG_DIR="/edx/etc" ARG COMMON_APP_DIR="/edx/app" ARG INSIGHTS_APP_DIR="${COMMON_APP_DIR}/insights" ARG INSIGHTS_VENV_DIR="${COMMON_APP_DIR}/insights/venvs/insights" ARG INSIGHTS_CODE_DIR="${INSIGHTS_APP_DIR}/edx_analytics_dashboard" ARG INSIGHTS_NODEENV_DIR="${COMMON_APP_DIR}/insights/nodeenvs/insights" -ENV PATH "${INSIGHTS_VENV_DIR}/bin:${INSIGHTS_NODEENV_DIR}/bin:$PATH" -ENV INSIGHTS_APP_DIR ${INSIGHTS_APP_DIR} -ENV THEME_SCSS "sass/themes/open-edx.scss" -ENV PYTHON_VERSION "${PYTHON_VERSION}" +ENV PATH="${INSIGHTS_VENV_DIR}/bin:${INSIGHTS_NODEENV_DIR}/bin:$PATH" +ENV INSIGHTS_APP_DIR=${INSIGHTS_APP_DIR} +ENV THEME_SCSS="sass/themes/open-edx.scss" +ENV PYTHON_VERSION="${PYTHON_VERSION}" RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python${PYTHON_VERSION} RUN pip install virtualenv @@ -75,20 +75,20 @@ RUN npm set progress=false && npm ci EXPOSE 8110 EXPOSE 18110 -FROM app as dev +FROM app AS dev RUN pip install --no-cache-dir -r requirements/local.txt -ENV DJANGO_SETTINGS_MODULE "analytics_dashboard.settings.devstack" +ENV DJANGO_SETTINGS_MODULE="analytics_dashboard.settings.devstack" # Backwards compatibility with devstack RUN touch "${INSIGHTS_APP_DIR}/insights_env" CMD while true; do python ./manage.py runserver 0.0.0.0:8110; sleep 2; done -FROM app as prod +FROM app AS prod -ENV DJANGO_SETTINGS_MODULE "analytics_dashboard.settings.production" +ENV DJANGO_SETTINGS_MODULE="analytics_dashboard.settings.production" CMD gunicorn \ --pythonpath=/edx/app/insights/edx_analytics_dashboard/analytics_dashboard \ diff --git a/dockerfiles/edx-analytics-data-api.Dockerfile b/dockerfiles/edx-analytics-data-api.Dockerfile index 7e64cbf..63937c2 100644 --- a/dockerfiles/edx-analytics-data-api.Dockerfile +++ b/dockerfiles/edx-analytics-data-api.Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:focal as base +FROM ubuntu:focal AS base # System requirements. @@ -17,7 +17,7 @@ RUN apt-get update && \ RUN apt-get update && \ apt-get install -qy \ - build-essential \ + build-essential \ curl \ vim \ language-pack-en \ @@ -39,21 +39,21 @@ RUN pip install virtualenv # Use UTF-8. RUN locale-gen en_US.UTF-8 -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 +ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US:en +ENV LC_ALL=en_US.UTF-8 ARG COMMON_APP_DIR="/edx/app" ARG ANALYTICS_API_SERVICE_NAME="analytics_api" -ENV ANALYTICS_API_HOME "${COMMON_APP_DIR}/${ANALYTICS_API_SERVICE_NAME}" +ENV ANALYTICS_API_HOME="${COMMON_APP_DIR}/${ANALYTICS_API_SERVICE_NAME}" ARG ANALYTICS_API_APP_DIR="${COMMON_APP_DIR}/${ANALYTICS_API_SERVICE_NAME}" ARG ANALYTICS_API_VENV_DIR="${COMMON_APP_DIR}/${ANALYTICS_API_SERVICE_NAME}/venvs/${ANALYTICS_API_SERVICE_NAME}" ARG ANALYTICS_API_CODE_DIR="${ANALYTICS_API_APP_DIR}/${ANALYTICS_API_SERVICE_NAME}" ENV ANALYTICS_API_CODE_DIR="${ANALYTICS_API_CODE_DIR}" -ENV PATH "${ANALYTICS_API_VENV_DIR}/bin:$PATH" -ENV COMMON_CFG_DIR "/edx/etc" -ENV ANALYTICS_API_CFG "/edx/etc/${ANALYTICS_API_SERVICE_NAME}.yml" +ENV PATH="${ANALYTICS_API_VENV_DIR}/bin:$PATH" +ENV COMMON_CFG_DIR="/edx/etc" +ENV ANALYTICS_API_CFG="/edx/etc/${ANALYTICS_API_SERVICE_NAME}.yml" # Working directory will be root of repo. WORKDIR ${ANALYTICS_API_CODE_DIR} @@ -66,9 +66,9 @@ RUN mkdir -p requirements # Expose canonical Analytics port EXPOSE 19001 -FROM base as prod +FROM base AS prod -ENV DJANGO_SETTINGS_MODULE "analyticsdataserver.settings.production" +ENV DJANGO_SETTINGS_MODULE="analyticsdataserver.settings.production" RUN curl -L -o requirements/production.txt https://raw.githubusercontent.com/edx/edx-analytics-data-api/master/requirements/production.txt @@ -85,9 +85,9 @@ RUN curl -L https://github.com/edx/edx-analytics-data-api/archive/refs/heads/mas CMD ["gunicorn" , "-b", "0.0.0.0:8100", "--pythonpath", "/edx/app/analytics_api/analytics_api","analyticsdataserver.wsgi:application"] -FROM base as dev +FROM base AS dev -ENV DJANGO_SETTINGS_MODULE "analyticsdataserver.settings.devstack" +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 diff --git a/dockerfiles/edx-exams.Dockerfile b/dockerfiles/edx-exams.Dockerfile index 2b8f298..574d69c 100644 --- a/dockerfiles/edx-exams.Dockerfile +++ b/dockerfiles/edx-exams.Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:focal as app +FROM ubuntu:focal AS app LABEL org.opencontainers.image.authors="sre@edx.org" diff --git a/dockerfiles/edx-notes-api.Dockerfile b/dockerfiles/edx-notes-api.Dockerfile index 9097c34..4d570df 100644 --- a/dockerfiles/edx-notes-api.Dockerfile +++ b/dockerfiles/edx-notes-api.Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:focal as app +FROM ubuntu:focal AS app # Packages installed: # git; Used to pull in particular requirements from github rather than pypi, @@ -36,9 +36,9 @@ RUN apt-get update && \ RUN locale-gen en_US.UTF-8 -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 +ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US:en +ENV LC_ALL=en_US.UTF-8 # ENV variables lifetime is bound to the container whereas ARGS variables lifetime is bound to the image building process only @@ -70,9 +70,9 @@ RUN mkdir -p /edx/var/log EXPOSE 8120 -FROM app as dev +FROM app AS dev -ENV DJANGO_SETTINGS_MODULE "notesserver.settings.devstack" +ENV DJANGO_SETTINGS_MODULE="notesserver.settings.devstack" # Backwards compatibility with devstack RUN touch "${COMMON_APP_DIR}/edx_notes_api_env" @@ -81,10 +81,10 @@ RUN curl -L https://github.com/openedx/edx-notes-api/archive/refs/heads/master.t CMD while true; do python ./manage.py runserver 0.0.0.0:8120; sleep 2; done -FROM app as production +FROM app AS production -ENV EDXNOTES_CONFIG_ROOT /edx/etc -ENV DJANGO_SETTINGS_MODULE "notesserver.settings.yaml_config" +ENV EDXNOTES_CONFIG_ROOT=/edx/etc +ENV DJANGO_SETTINGS_MODULE="notesserver.settings.yaml_config" RUN curl -L https://github.com/openedx/edx-notes-api/archive/refs/heads/master.tar.gz | tar -xz --strip-components=1 diff --git a/dockerfiles/enterprise-access.Dockerfile b/dockerfiles/enterprise-access.Dockerfile index f984abb..f7e5e7b 100644 --- a/dockerfiles/enterprise-access.Dockerfile +++ b/dockerfiles/enterprise-access.Dockerfile @@ -116,7 +116,6 @@ RUN pip install newrelic CMD newrelic-admin run-program gunicorn --workers=2 --name enterprise-access -c /edx/app/enterprise-access/enterprise_access/docker_gunicorn_configuration.py --log-file - --max-requests=1000 enterprise_access.wsgi:application FROM app AS devstack - USER root RUN pip install -r requirements/dev.txt diff --git a/dockerfiles/enterprise-catalog.Dockerfile b/dockerfiles/enterprise-catalog.Dockerfile index dd81b2f..b80a3cd 100644 --- a/dockerfiles/enterprise-catalog.Dockerfile +++ b/dockerfiles/enterprise-catalog.Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:focal as app +FROM ubuntu:focal AS app MAINTAINER sre@edx.org # Packages installed: @@ -89,7 +89,7 @@ CMD ["gunicorn", "--workers=2", "--name", "enterprise_catalog", "-c", "/edx/app/ # Create newrelic image used by the experimental docker shim. # ############################################################### # TODO: remove this after we migrate to k8s since it will serve no more purpose. -FROM app as newrelic +FROM app AS newrelic RUN pip install newrelic CMD ["newrelic-admin", "run-program", "gunicorn", "--workers=2", "--name", "enterprise_catalog", "-c", "/edx/app/enterprise_catalog/enterprise_catalog/enterprise_catalog/docker_gunicorn_configuration.py", "--log-file", "-", "--max-requests=1000", "enterprise_catalog.wsgi:application"] @@ -98,7 +98,7 @@ CMD ["newrelic-admin", "run-program", "gunicorn", "--workers=2", "--name", "ente ################################# # TODO: remove this after we migrate to k8s. It already isn't used today, but just defer changes until absolutely # necessary for safety. -FROM app as legacy_devapp +FROM app AS legacy_devapp # Dev ports EXPOSE 18160 EXPOSE 18161 diff --git a/dockerfiles/enterprise-subsidy.Dockerfile b/dockerfiles/enterprise-subsidy.Dockerfile index 0249a99..3b8ebb9 100644 --- a/dockerfiles/enterprise-subsidy.Dockerfile +++ b/dockerfiles/enterprise-subsidy.Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:focal as app +FROM ubuntu:focal AS app MAINTAINER sre@edx.org # Packages installed: @@ -73,10 +73,10 @@ RUN virtualenv -p python${PYTHON_VERSION} $VIRTUAL_ENV ENV PATH="$VIRTUAL_ENV/bin:$PATH" RUN locale-gen en_US.UTF-8 -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 -ENV DJANGO_SETTINGS_MODULE enterprise_subsidy.settings.production +ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US:en +ENV LC_ALL=en_US.UTF-8 +ENV DJANGO_SETTINGS_MODULE=enterprise_subsidy.settings.production EXPOSE 18280 RUN useradd -m --shell /bin/false app @@ -102,11 +102,11 @@ USER app CMD gunicorn --workers=2 --name enterprise-subsidy -c /edx/app/enterprise-subsidy/enterprise_subsidy/docker_gunicorn_configuration.py --log-file - --max-requests=1000 enterprise_subsidy.wsgi:application -FROM app as newrelic +FROM app AS newrelic RUN pip install newrelic CMD gunicorn --workers=2 --name enterprise-subsidy -c /edx/app/enterprise-subsidy/enterprise_subsidy/docker_gunicorn_configuration.py --log-file - --max-requests=1000 enterprise_subsidy.wsgi:application -FROM app as devstack +FROM app AS devstack USER root RUN pip install -r requirements/dev.txt USER app diff --git a/dockerfiles/portal-designer.Dockerfile b/dockerfiles/portal-designer.Dockerfile index 5ea2962..0ba5c45 100644 --- a/dockerfiles/portal-designer.Dockerfile +++ b/dockerfiles/portal-designer.Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:focal as app +FROM ubuntu:focal AS app MAINTAINER sre@edx.org # ENV variables for Python 3.12 support @@ -80,7 +80,7 @@ USER app CMD gunicorn --workers=2 --name designer -c /edx/app/designer/designer/docker_gunicorn_configuration.py --log-file - --max-requests=1000 designer.wsgi:application # Change into dev app -FROM app as devstack +FROM app AS devstack # Install dependencies as root and revert back to application user USER root RUN pip install -r /edx/app/designer/requirements/dev.txt diff --git a/dockerfiles/program-intent-engagement.Dockerfile b/dockerfiles/program-intent-engagement.Dockerfile index 25787d8..217684d 100644 --- a/dockerfiles/program-intent-engagement.Dockerfile +++ b/dockerfiles/program-intent-engagement.Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:focal as app +FROM ubuntu:focal AS app MAINTAINER sre@edx.org @@ -67,10 +67,10 @@ RUN ln -s /usr/bin/python3 /usr/bin/python RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN locale-gen en_US.UTF-8 -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 -ENV DJANGO_SETTINGS_MODULE program_intent_engagement.settings.production +ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US:en +ENV LC_ALL=en_US.UTF-8 +ENV DJANGO_SETTINGS_MODULE=program_intent_engagement.settings.production EXPOSE 18781 RUN useradd -m --shell /bin/false app diff --git a/dockerfiles/registrar.Dockerfile b/dockerfiles/registrar.Dockerfile index 1581234..22b4dde 100644 --- a/dockerfiles/registrar.Dockerfile +++ b/dockerfiles/registrar.Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:focal as app +FROM ubuntu:focal AS app # ENV variables for Python 3.12 support ARG PYTHON_VERSION=3.12 @@ -44,9 +44,9 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone # Use UTF-8. RUN locale-gen en_US.UTF-8 -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 +ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US:en +ENV LC_ALL=en_US.UTF-8 ARG COMMON_CFG_DIR="/edx/etc" ARG COMMON_APP_DIR="/edx/app" @@ -55,8 +55,8 @@ ARG REGISTRAR_VENV_DIR="${COMMON_APP_DIR}/venvs/registrar" ARG REGISTRAR_CODE_DIR="${REGISTRAR_APP_DIR}" ENV PATH="$REGISTRAR_VENV_DIR/bin:$PATH" -ENV REGISTRAR_APP_DIR ${REGISTRAR_APP_DIR} -ENV REGISTRAR_CODE_DIR ${REGISTRAR_CODE_DIR} +ENV REGISTRAR_APP_DIR=${REGISTRAR_APP_DIR} +ENV REGISTRAR_CODE_DIR=${REGISTRAR_CODE_DIR} # Working directory will be root of repo. WORKDIR ${REGISTRAR_CODE_DIR} @@ -73,7 +73,7 @@ ENV REGISTRAR_CFG="${COMMON_CFG_DIR}/registrar.yml" EXPOSE 18734 EXPOSE 18735 -FROM app as dev +FROM app AS dev # fetching the requirement file that is needed RUN curl -L -o requirements/devstack.txt https://raw.githubusercontent.com/edx/registrar/master/requirements/devstack.txt @@ -83,11 +83,11 @@ 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 +ENV DJANGO_SETTINGS_MODULE=registrar.settings.devstack CMD while true; do python ./manage.py runserver 0.0.0.0:18734; sleep 2; done -FROM app as prod +FROM app AS prod # fetching the requirement file that is needed RUN curl -L -o requirements/production.txt https://raw.githubusercontent.com/edx/registrar/master/requirements/production.txt @@ -97,6 +97,6 @@ RUN pip install --no-cache-dir -r ${REGISTRAR_CODE_DIR}/requirements/production. # 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.production +ENV DJANGO_SETTINGS_MODULE=registrar.settings.production CMD ["gunicorn", "--workers=2", "--name", "registrar", "-c", "/edx/app/registrar/registrar/docker_gunicorn_configuration.py", "--max-requests=1000", "registrar.wsgi:application"] diff --git a/dockerfiles/xqueue.Dockerfile b/dockerfiles/xqueue.Dockerfile index f62b4cd..3d0e2a4 100644 --- a/dockerfiles/xqueue.Dockerfile +++ b/dockerfiles/xqueue.Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:focal as app +FROM ubuntu:focal AS app # System requirements @@ -12,9 +12,9 @@ RUN ln -s /usr/bin/python3 /usr/bin/python # Use UTF-8. RUN locale-gen en_US.UTF-8 -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 +ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US:en +ENV LC_ALL=en_US.UTF-8 ARG COMMON_APP_DIR="/edx/app" ARG XQUEUE_APP_DIR="${COMMON_APP_DIR}/xqueue" @@ -37,7 +37,7 @@ RUN touch ${XQUEUE_APP_DIR}/xqueue_env # Expose ports. EXPOSE 8040 -FROM app as dev +FROM app AS dev RUN curl -L -o ${XQUEUE_CODE_DIR}/requirements/dev.txt https://raw.githubusercontent.com/openedx/xqueue/master/requirements/dev.txt # xqueue service config commands below @@ -46,11 +46,11 @@ 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 +ENV DJANGO_SETTINGS_MODULE=xqueue.devstack CMD while true; do python ./manage.py runserver 0.0.0.0:8040; sleep 2; done -FROM app as production +FROM app AS production RUN curl -L -o ${XQUEUE_APP_DIR}/requirements.txt https://raw.githubusercontent.com/openedx/xqueue/master/requirements.txt # xqueue service config commands below @@ -59,7 +59,7 @@ RUN pip install -r ${XQUEUE_APP_DIR}/requirements.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.production +ENV DJANGO_SETTINGS_MODULE=xqueue.production CMD gunicorn \ --pythonpath=/edx/app/xqueue/xqueue \ From 3493d5b26cacd94c1bb50e3ff6235ac7f3fe77ef Mon Sep 17 00:00:00 2001 From: Bilal Qamar <59555732+BilalQamar95@users.noreply.github.com> Date: Tue, 5 Nov 2024 16:24:31 +0500 Subject: [PATCH 02/18] feat: added dockerfile and docker image push workflow for license-manager --- .../workflows/push-license-manager-image.yaml | 64 +++++++++ dockerfiles/license-manager.Dockerfile | 129 ++++++++++++++++++ 2 files changed, 193 insertions(+) create mode 100644 .github/workflows/push-license-manager-image.yaml create mode 100644 dockerfiles/license-manager.Dockerfile diff --git a/.github/workflows/push-license-manager-image.yaml b/.github/workflows/push-license-manager-image.yaml new file mode 100644 index 0000000..02d91e4 --- /dev/null +++ b/.github/workflows/push-license-manager-image.yaml @@ -0,0 +1,64 @@ +name: Build and Push License Manager Image + +on: + workflow_dispatch: + inputs: + branch: + description: "Target branch from which the source dockerfile from image will be sourced" + + schedule: + - cron: "0 4 * * 1-5" # UTC Time + +# Added for testing purposes. Will remove once the PR is finalised + pull_request: + branches: + - '**' + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + + steps: + - name: Get tag name + id: get-tag-name + uses: actions/github-script@v5 + with: + script: | + const tagName = "${{ github.event.inputs.branch }}" || 'latest'; + console.log('Will use tag: ' + tagName); + return tagName; + result-encoding: string + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + + - name: Build and push Dev Docker image + uses: docker/build-push-action@v6 + with: + file: ./dockerfiles/license-manager.Dockerfile + push: true + target: app + tags: edxops/license-manager:${{ steps.get-tag-name.outputs.result }} + + # Commenting the notification section temporarily as we don't have the owning team email for titans yet. + # - name: Send failure notification + # if: failure() + # uses: dawidd6/action-send-mail@v3 + # with: + # server_address: email-smtp.us-east-1.amazonaws.com + # server_port: 465 + # username: ${{secrets.edx_smtp_username}} + # password: ${{secrets.edx_smtp_password}} + # subject: Push Image to docker.io/edxops failed in License Manager Coordinator + # to: team-titans@edx.org + # from: github-actions + # body: Push Image to docker.io/edxops for License Manager Coordinator failed! For details see "github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" diff --git a/dockerfiles/license-manager.Dockerfile b/dockerfiles/license-manager.Dockerfile new file mode 100644 index 0000000..3c43a57 --- /dev/null +++ b/dockerfiles/license-manager.Dockerfile @@ -0,0 +1,129 @@ +FROM ubuntu:focal as app +MAINTAINER devops@edx.org + + +# Packages installed: +# git; Used to pull in particular requirements from github rather than pypi, +# and to check the sha of the code checkout. + +# language-pack-en locales; ubuntu locale support so that system utilities have a consistent +# language and time zone. + +# python; ubuntu doesnt ship with python, so this is the python we will use to run the application + +# python3-pip; install pip to install application requirements.txt files + +# libssl-dev; # mysqlclient wont install without this. + +# pkg-config +# mysqlclient>=2.2.0 requires this (https://github.com/PyMySQL/mysqlclient/issues/620) + +# libmysqlclient-dev; to install header files needed to use native C implementation for +# MySQL-python for performance gains. + +# wget to download a watchman binary archive + +# unzip to unzip a watchman binary archive + +# If you add a package here please include a comment above describing what it is used for + +# ENV variables for Python 3.12 support +ARG PYTHON_VERSION=3.12 +ENV TZ=UTC +ENV TERM=xterm-256color +ENV DEBIAN_FRONTEND=noninteractive + +# software-properties-common is needed to setup Python 3.12 env +RUN apt-get update && \ + apt-get install -y software-properties-common && \ + apt-add-repository -y ppa:deadsnakes/ppa + +RUN apt-get update && apt-get -qy install --no-install-recommends \ + language-pack-en \ + locales \ + pkg-config \ + libmysqlclient-dev \ + libssl-dev \ + build-essential \ + git \ + wget \ + unzip \ + curl \ + libffi-dev \ + libsqlite3-dev \ + python3-pip \ + python${PYTHON_VERSION} \ + python${PYTHON_VERSION}-dev \ + python${PYTHON_VERSION}-distutils + +# Use virtualenv pypi package with Python 3.12 +RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python${PYTHON_VERSION} +RUN pip install virtualenv + +ENV VIRTUAL_ENV=/edx/app/license-manager/venvs/license-manager +RUN virtualenv -p python${PYTHON_VERSION} $VIRTUAL_ENV +ENV PATH="$VIRTUAL_ENV/bin:$PATH" + +RUN locale-gen en_US.UTF-8 +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:en +ENV LC_ALL en_US.UTF-8 +ENV DJANGO_SETTINGS_MODULE license_manager.settings.production + +EXPOSE 18170 +EXPOSE 18171 +RUN useradd -m --shell /bin/false app + +# Install watchman +RUN wget https://github.com/facebook/watchman/releases/download/v2023.11.20.00/watchman-v2023.11.20.00-linux.zip +RUN unzip watchman-v2023.11.20.00-linux.zip +RUN mkdir -p /usr/local/{bin,lib} /usr/local/var/run/watchman +RUN cp watchman-v2023.11.20.00-linux/bin/* /usr/local/bin +RUN cp watchman-v2023.11.20.00-linux/lib/* /usr/local/lib +RUN chmod 755 /usr/local/bin/watchman +RUN chmod 2777 /usr/local/var/run/watchman + +# Now install license-manager +WORKDIR /edx/app/license_manager + +RUN mkdir -p requirements + +# Install production requirements +RUN curl -L -o requirements/pip.txt https://raw.githubusercontent.com/edx/license-manager/master/requirements/pip.txt +RUN pip install --no-cache-dir -r requirements/pip.txt + +RUN curl -L -o requirements/production.txt https://raw.githubusercontent.com/edx/license-manager/master/requirements/production.txt +RUN pip install --no-cache-dir -r requirements/production.txt + +RUN curl -L https://github.com/edx/license-manager/archive/refs/heads/master.tar.gz | tar -xz --strip-components=1 + +RUN mkdir -p /edx/var/log + +# Code is owned by root so it cannot be modified by the application user. +# So we copy it before changing users. +USER app + +# Gunicorn 19 does not log to stdout or stderr by default. Once we are past gunicorn 19, the logging to STDOUT need not be specified. +CMD gunicorn --workers=2 --name license_manager -c /edx/app/license_manager/license_manager/docker_gunicorn_configuration.py --log-file - --max-requests=1000 license_manager.wsgi:application + + +FROM app as newrelic +RUN pip install newrelic +CMD newrelic-admin run-program gunicorn --workers=2 --name license_manager -c /edx/app/license_manager/license_manager/docker_gunicorn_configuration.py --log-file - --max-requests=1000 license_manager.wsgi:application + + +FROM app as devstack +USER root +RUN pip install -r /edx/app/license_manager/requirements/dev.txt +USER app +CMD gunicorn --reload --workers=2 --name license_manager -c /edx/app/license_manager/license_manager/docker_gunicorn_configuration.py --log-file - --max-requests=1000 license_manager.wsgi:application + + +FROM app as legacy_devapp +# Dev ports +EXPOSE 18170 +EXPOSE 18171 +USER root +RUN pip install -r /edx/app/license_manager/requirements/dev.txt +USER app +CMD gunicorn --reload --workers=2 --name license_manager -c /edx/app/license_manager/license_manager/docker_gunicorn_configuration.py --log-file - --max-requests=1000 license_manager.wsgi:application From 4016f7bea5ae1ca612b10804b0d594e07fcc7c9e Mon Sep 17 00:00:00 2001 From: Usama Sadiq Date: Tue, 5 Nov 2024 16:57:03 +0500 Subject: [PATCH 03/18] edx notes api Dockerfile Python 3.12 upgrade (#49) * build: Update edx-notes-api Dockerfile to use Python 3.12 --- dockerfiles/edx-notes-api.Dockerfile | 43 ++++++++++++++++++---------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/dockerfiles/edx-notes-api.Dockerfile b/dockerfiles/edx-notes-api.Dockerfile index 4d570df..7707c16 100644 --- a/dockerfiles/edx-notes-api.Dockerfile +++ b/dockerfiles/edx-notes-api.Dockerfile @@ -7,7 +7,7 @@ FROM ubuntu:focal AS app # language-pack-en locales; ubuntu locale support so that system utilities have a consistent # language and time zone. -# python3.8-dev; to install python 3.8 +# python3.12-dev; to install python 3.12 # python3-venv; installs venv module required to create virtual environments # libssl-dev; # mysqlclient wont install without this. @@ -17,29 +17,45 @@ FROM ubuntu:focal AS app # If you add a package here please include a comment above describing what it is used for +# ENV variables for Python 3.12 support +ARG PYTHON_VERSION=3.12 +ENV TZ=UTC +ENV TERM=xterm-256color +ENV DEBIAN_FRONTEND=noninteractive + +# software-properties-common is needed to setup Python 3.12 env RUN apt-get update && \ - apt-get install -y software-properties-common && \ - apt-add-repository -y ppa:deadsnakes/ppa && \ - apt-get update && apt-get upgrade -qy && \ - apt-get install \ + apt-get install -y software-properties-common && \ + apt-add-repository -y ppa:deadsnakes/ppa + +RUN apt-get update && apt-get -qy install --no-install-recommends \ + build-essential \ language-pack-en \ locales \ - git \ - libmysqlclient-dev \ pkg-config \ libssl-dev \ - build-essential \ - python3.8-dev \ - python3.8-distutils \ - python3-virtualenv -qy && \ + libffi-dev \ + libsqlite3-dev \ + libmysqlclient-dev \ + git \ + curl \ + python3-pip \ + python${PYTHON_VERSION} \ + python${PYTHON_VERSION}-dev \ + python${PYTHON_VERSION}-distutils && \ rm -rf /var/lib/apt/lists/* +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone +RUN ln -s /usr/bin/python3 /usr/bin/python RUN locale-gen en_US.UTF-8 ENV LANG=en_US.UTF-8 ENV LANGUAGE=en_US:en ENV LC_ALL=en_US.UTF-8 +# need to use virtualenv pypi package with Python 3.12 +RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python${PYTHON_VERSION} +RUN pip install virtualenv # ENV variables lifetime is bound to the container whereas ARGS variables lifetime is bound to the image building process only # Also ARGS provide us an option of compatibility of Path structure for Tutor and other OpenedX installations @@ -51,12 +67,9 @@ ENV PATH="$NOTES_VENV_DIR/bin:$PATH" RUN useradd -m --shell /bin/false app -# Install curl -RUN apt-get update && apt-get install -y curl - RUN mkdir -p requirements -RUN virtualenv -p python3.8 --always-copy ${NOTES_VENV_DIR} +RUN virtualenv -p python${PYTHON_VERSION} --always-copy ${NOTES_VENV_DIR} RUN pip install --upgrade pip setuptools From 4cf336f8faa8955f6bbc54588d1da257d5d74655 Mon Sep 17 00:00:00 2001 From: Bilal Qamar <59555732+BilalQamar95@users.noreply.github.com> Date: Tue, 5 Nov 2024 16:59:01 +0500 Subject: [PATCH 04/18] chore: Remove pull_request trigger from workflow --- .github/workflows/push-license-manager-image.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/push-license-manager-image.yaml b/.github/workflows/push-license-manager-image.yaml index 02d91e4..dafb76b 100644 --- a/.github/workflows/push-license-manager-image.yaml +++ b/.github/workflows/push-license-manager-image.yaml @@ -9,11 +9,6 @@ on: schedule: - cron: "0 4 * * 1-5" # UTC Time -# Added for testing purposes. Will remove once the PR is finalised - pull_request: - branches: - - '**' - jobs: build-and-push-image: runs-on: ubuntu-latest From bdcaefaaa139ab8d78b63c78c25f8d7c294a94b3 Mon Sep 17 00:00:00 2001 From: Bilal Qamar <59555732+BilalQamar95@users.noreply.github.com> Date: Tue, 5 Nov 2024 17:12:46 +0500 Subject: [PATCH 05/18] chore: update Docker image tag in workflow --- .github/workflows/push-license-manager-image.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push-license-manager-image.yaml b/.github/workflows/push-license-manager-image.yaml index dafb76b..c6d91fd 100644 --- a/.github/workflows/push-license-manager-image.yaml +++ b/.github/workflows/push-license-manager-image.yaml @@ -42,7 +42,7 @@ jobs: file: ./dockerfiles/license-manager.Dockerfile push: true target: app - tags: edxops/license-manager:${{ steps.get-tag-name.outputs.result }} + tags: edxops/license-manager-dev:${{ steps.get-tag-name.outputs.result }} # Commenting the notification section temporarily as we don't have the owning team email for titans yet. # - name: Send failure notification From b9ab966b0b3a2cfdfe905289cf6483a135821417 Mon Sep 17 00:00:00 2001 From: Usama Sadiq Date: Thu, 7 Nov 2024 16:29:51 +0500 Subject: [PATCH 06/18] build: fix edx-notes-api WORKDIR in Dockerfile (#52) * build: fix edx-notes-api WORKDIR in Dockerfile --- dockerfiles/edx-notes-api.Dockerfile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/dockerfiles/edx-notes-api.Dockerfile b/dockerfiles/edx-notes-api.Dockerfile index 7707c16..884dfef 100644 --- a/dockerfiles/edx-notes-api.Dockerfile +++ b/dockerfiles/edx-notes-api.Dockerfile @@ -48,7 +48,7 @@ RUN apt-get update && apt-get -qy install --no-install-recommends \ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN ln -s /usr/bin/python3 /usr/bin/python -RUN locale-gen en_US.UTF-8 +RUN locale-gen=en_US.UTF-8 ENV LANG=en_US.UTF-8 ENV LANGUAGE=en_US:en ENV LC_ALL=en_US.UTF-8 @@ -59,12 +59,16 @@ RUN pip install virtualenv # ENV variables lifetime is bound to the container whereas ARGS variables lifetime is bound to the image building process only # Also ARGS provide us an option of compatibility of Path structure for Tutor and other OpenedX installations -ARG COMMON_CFG_DIR "/edx/etc" +ARG COMMON_CFG_DIR="/edx/etc" ARG COMMON_APP_DIR="/edx/app" +ARG NOTES_APP_DIR="${COMMON_APP_DIR}/notes" ARG NOTES_VENV_DIR="${COMMON_APP_DIR}/venvs/notes" +ENV NOTES_APP_DIR=${NOTES_APP_DIR} ENV PATH="$NOTES_VENV_DIR/bin:$PATH" +WORKDIR ${NOTES_APP_DIR} + RUN useradd -m --shell /bin/false app RUN mkdir -p requirements @@ -79,6 +83,8 @@ RUN curl -L -o requirements/pip.txt https://raw.githubusercontent.com/openedx/ed RUN pip install --no-cache-dir -r requirements/base.txt RUN pip install --no-cache-dir -r requirements/pip.txt +RUN curl -L https://github.com/openedx/edx-notes-api/archive/refs/heads/master.tar.gz | tar -xz --strip-components=1 + RUN mkdir -p /edx/var/log EXPOSE 8120 @@ -90,17 +96,13 @@ ENV DJANGO_SETTINGS_MODULE="notesserver.settings.devstack" # Backwards compatibility with devstack RUN touch "${COMMON_APP_DIR}/edx_notes_api_env" -RUN curl -L https://github.com/openedx/edx-notes-api/archive/refs/heads/master.tar.gz | tar -xz --strip-components=1 - CMD while true; do python ./manage.py runserver 0.0.0.0:8120; sleep 2; done FROM app AS production -ENV EDXNOTES_CONFIG_ROOT=/edx/etc +ENV EDXNOTES_CONFIG_ROOT="/edx/etc" ENV DJANGO_SETTINGS_MODULE="notesserver.settings.yaml_config" -RUN curl -L https://github.com/openedx/edx-notes-api/archive/refs/heads/master.tar.gz | tar -xz --strip-components=1 - USER app # Gunicorn 19 does not log to stdout or stderr by default. Once we are past gunicorn 19, the logging to STDOUT need not be specified. From 727ea994c3945f871dd5aab08fdf0aeecaa42c50 Mon Sep 17 00:00:00 2001 From: Usama Sadiq Date: Thu, 7 Nov 2024 16:39:04 +0500 Subject: [PATCH 07/18] fix: fix Dockerfile run command (#53) --- dockerfiles/edx-notes-api.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfiles/edx-notes-api.Dockerfile b/dockerfiles/edx-notes-api.Dockerfile index 884dfef..d42b26b 100644 --- a/dockerfiles/edx-notes-api.Dockerfile +++ b/dockerfiles/edx-notes-api.Dockerfile @@ -48,7 +48,7 @@ RUN apt-get update && apt-get -qy install --no-install-recommends \ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN ln -s /usr/bin/python3 /usr/bin/python -RUN locale-gen=en_US.UTF-8 +RUN locale-gen en_US.UTF-8 ENV LANG=en_US.UTF-8 ENV LANGUAGE=en_US:en ENV LC_ALL=en_US.UTF-8 From f0aaebc75e995aadf4d070545d120b9aae47591f Mon Sep 17 00:00:00 2001 From: Bilal Qamar <59555732+BilalQamar95@users.noreply.github.com> Date: Fri, 15 Nov 2024 18:12:00 +0500 Subject: [PATCH 08/18] chore: updated pushed image for edx-analytics-dashboard (#55) --- .github/workflows/push-edx-analytics-dashboard-image.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push-edx-analytics-dashboard-image.yaml b/.github/workflows/push-edx-analytics-dashboard-image.yaml index 6bf61fa..4890d0e 100644 --- a/.github/workflows/push-edx-analytics-dashboard-image.yaml +++ b/.github/workflows/push-edx-analytics-dashboard-image.yaml @@ -42,7 +42,7 @@ jobs: file: ./dockerfiles/edx-analytics-dashboard.Dockerfile push: true target: dev - tags: edxops/edx-analytics-dashboard-dev:${{ steps.get-tag-name.outputs.result }} + tags: edxops/insights-dev:${{ steps.get-tag-name.outputs.result }} - name: Send failure notification if: failure() From 1cee6c7aa7fd1fe5f921e51acb4de51e678b7ef9 Mon Sep 17 00:00:00 2001 From: Usama Sadiq Date: Mon, 18 Nov 2024 20:08:19 +0500 Subject: [PATCH 09/18] build: update enterprise IDA image platforms (#56) --- .github/workflows/push-enterprise-access-image.yaml | 1 + .github/workflows/push-enterprise-catalog-image.yaml | 1 + .github/workflows/push-enterprise-subsidy-image.yaml | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/workflows/push-enterprise-access-image.yaml b/.github/workflows/push-enterprise-access-image.yaml index 53a8ce5..e4e81f9 100644 --- a/.github/workflows/push-enterprise-access-image.yaml +++ b/.github/workflows/push-enterprise-access-image.yaml @@ -43,6 +43,7 @@ jobs: push: true target: devstack tags: edxops/enterprise-access-dev:${{ steps.get-tag-name.outputs.result }} + platforms: linux/amd64,linux/arm64 - name: Send failure notification if: failure() diff --git a/.github/workflows/push-enterprise-catalog-image.yaml b/.github/workflows/push-enterprise-catalog-image.yaml index b411ed1..ca77e93 100644 --- a/.github/workflows/push-enterprise-catalog-image.yaml +++ b/.github/workflows/push-enterprise-catalog-image.yaml @@ -43,6 +43,7 @@ jobs: push: true target: legacy_devapp tags: edxops/enterprise-catalog-dev:${{ steps.get-tag-name.outputs.result }} + platforms: linux/amd64,linux/arm64 - name: Send failure notification if: failure() diff --git a/.github/workflows/push-enterprise-subsidy-image.yaml b/.github/workflows/push-enterprise-subsidy-image.yaml index cb59967..bc776ce 100644 --- a/.github/workflows/push-enterprise-subsidy-image.yaml +++ b/.github/workflows/push-enterprise-subsidy-image.yaml @@ -43,6 +43,7 @@ jobs: push: true target: devstack tags: edxops/enterprise-subsidy-dev:${{ steps.get-tag-name.outputs.result }} + platforms: linux/amd64,linux/arm64 - name: Send failure notification if: failure() From 9a647f0b03df83bc77c0fd94b478cbcfb2532624 Mon Sep 17 00:00:00 2001 From: Usama Sadiq Date: Mon, 18 Nov 2024 20:34:13 +0500 Subject: [PATCH 10/18] build: update WORKDIR in enterprise IDAs (#57) --- .github/workflows/push-license-manager-image.yaml | 1 + dockerfiles/enterprise-catalog.Dockerfile | 1 + dockerfiles/enterprise-subsidy.Dockerfile | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/workflows/push-license-manager-image.yaml b/.github/workflows/push-license-manager-image.yaml index c6d91fd..7026054 100644 --- a/.github/workflows/push-license-manager-image.yaml +++ b/.github/workflows/push-license-manager-image.yaml @@ -43,6 +43,7 @@ jobs: push: true target: app tags: edxops/license-manager-dev:${{ steps.get-tag-name.outputs.result }} + platforms: linux/amd64,linux/arm64 # Commenting the notification section temporarily as we don't have the owning team email for titans yet. # - name: Send failure notification diff --git a/dockerfiles/enterprise-catalog.Dockerfile b/dockerfiles/enterprise-catalog.Dockerfile index b80a3cd..579fb93 100644 --- a/dockerfiles/enterprise-catalog.Dockerfile +++ b/dockerfiles/enterprise-catalog.Dockerfile @@ -70,6 +70,7 @@ EXPOSE 8161 RUN useradd -m --shell /bin/false app +WORKDIR /edx/app/enterprise-catalog RUN curl -L -o requirements/production.txt https://raw.githubusercontent.com/openedx/enterprise-catalog/master/requirements/production.txt RUN pip install -r requirements/production.txt diff --git a/dockerfiles/enterprise-subsidy.Dockerfile b/dockerfiles/enterprise-subsidy.Dockerfile index 3b8ebb9..2cfab86 100644 --- a/dockerfiles/enterprise-subsidy.Dockerfile +++ b/dockerfiles/enterprise-subsidy.Dockerfile @@ -80,6 +80,7 @@ ENV DJANGO_SETTINGS_MODULE=enterprise_subsidy.settings.production EXPOSE 18280 RUN useradd -m --shell /bin/false app +WORKDIR /edx/app/enterprise-subsidy # Dependencies are installed as root so they cannot be modified by the application user. From 9255c2294d9d9e42af474cfd08212a8565433913 Mon Sep 17 00:00:00 2001 From: Usama Sadiq Date: Mon, 18 Nov 2024 20:54:18 +0500 Subject: [PATCH 11/18] fix: fix commands order in dockerfiles (#58) --- dockerfiles/enterprise-catalog.Dockerfile | 3 +-- dockerfiles/enterprise-subsidy.Dockerfile | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/dockerfiles/enterprise-catalog.Dockerfile b/dockerfiles/enterprise-catalog.Dockerfile index 579fb93..c854561 100644 --- a/dockerfiles/enterprise-catalog.Dockerfile +++ b/dockerfiles/enterprise-catalog.Dockerfile @@ -50,8 +50,6 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python${PYTHON_VERSION} RUN pip install virtualenv -RUN mkdir -p requirements - ENV VIRTUAL_ENV=/venv RUN virtualenv -p python$PYTHON_VERSION $VIRTUAL_ENV ENV PATH="$VIRTUAL_ENV/bin:$PATH" @@ -71,6 +69,7 @@ EXPOSE 8161 RUN useradd -m --shell /bin/false app WORKDIR /edx/app/enterprise-catalog +RUN mkdir -p requirements RUN curl -L -o requirements/production.txt https://raw.githubusercontent.com/openedx/enterprise-catalog/master/requirements/production.txt RUN pip install -r requirements/production.txt diff --git a/dockerfiles/enterprise-subsidy.Dockerfile b/dockerfiles/enterprise-subsidy.Dockerfile index 2cfab86..cf1ac3a 100644 --- a/dockerfiles/enterprise-subsidy.Dockerfile +++ b/dockerfiles/enterprise-subsidy.Dockerfile @@ -65,8 +65,6 @@ RUN rm -rf /var/lib/apt/lists/* RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python${PYTHON_VERSION} RUN pip install virtualenv -RUN mkdir -p requirements - # Create a virtualenv for sanity ENV VIRTUAL_ENV=/edx/venvs/enterprise-subsidy RUN virtualenv -p python${PYTHON_VERSION} $VIRTUAL_ENV @@ -81,6 +79,7 @@ ENV DJANGO_SETTINGS_MODULE=enterprise_subsidy.settings.production EXPOSE 18280 RUN useradd -m --shell /bin/false app WORKDIR /edx/app/enterprise-subsidy +RUN mkdir -p requirements # Dependencies are installed as root so they cannot be modified by the application user. From f9bbf3d82938f5a082cc6f5ddb0295ffc0b211dd Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Mon, 18 Nov 2024 13:26:28 -0500 Subject: [PATCH 12/18] fix: update enterprise-catalog Dockerfile --- dockerfiles/enterprise-catalog.Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dockerfiles/enterprise-catalog.Dockerfile b/dockerfiles/enterprise-catalog.Dockerfile index c854561..1c3711f 100644 --- a/dockerfiles/enterprise-catalog.Dockerfile +++ b/dockerfiles/enterprise-catalog.Dockerfile @@ -82,8 +82,7 @@ RUN curl -L https://github.com/openedx/enterprise-catalog/archive/refs/heads/mas USER app # Gunicorn 19 does not log to stdout or stderr by default. Once we are past gunicorn 19, the logging to STDOUT need not be specified. -CMD ["gunicorn", "--workers=2", "--name", "enterprise_catalog", "-c", "/edx/app/enterprise_catalog/enterprise_catalog/enterprise_catalog/docker_gunicorn_configuration.py", "--log-file", "-", "--max-requests=1000", "enterprise_catalog.wsgi:application"] - +CMD gunicorn --workers=2 --name enterprise-catalog -c /edx/app/enterprise-catalog/enterprise_catalog/docker_gunicorn_configuration.py --log-file - --max-requests=1000 enterprise_catalog.wsgi:application ############################################################### # Create newrelic image used by the experimental docker shim. # @@ -105,4 +104,4 @@ EXPOSE 18161 USER root RUN pip install -r requirements/dev.txt USER app -CMD ["gunicorn", "--reload", "--workers=2", "--name", "enterprise_catalog", "-b", ":18160", "-c", "/edx/app/enterprise_catalog/enterprise_catalog/enterprise_catalog/docker_gunicorn_configuration.py", "--log-file", "-", "--max-requests=1000", "enterprise_catalog.wsgi:application"] +CMD gunicorn --workers=2 --name enterprise-catalog -c /edx/app/enterprise-catalog/enterprise_catalog/docker_gunicorn_configuration.py --log-file - --max-requests=1000 enterprise_catalog.wsgi:application From d8be4a19de4dc5a4bfe5df9ae5dd785b5aa882c3 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Mon, 18 Nov 2024 13:45:03 -0500 Subject: [PATCH 13/18] fix: enterprise_catalog --- dockerfiles/enterprise-catalog.Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dockerfiles/enterprise-catalog.Dockerfile b/dockerfiles/enterprise-catalog.Dockerfile index 1c3711f..fcd506b 100644 --- a/dockerfiles/enterprise-catalog.Dockerfile +++ b/dockerfiles/enterprise-catalog.Dockerfile @@ -82,7 +82,7 @@ RUN curl -L https://github.com/openedx/enterprise-catalog/archive/refs/heads/mas USER app # Gunicorn 19 does not log to stdout or stderr by default. Once we are past gunicorn 19, the logging to STDOUT need not be specified. -CMD gunicorn --workers=2 --name enterprise-catalog -c /edx/app/enterprise-catalog/enterprise_catalog/docker_gunicorn_configuration.py --log-file - --max-requests=1000 enterprise_catalog.wsgi:application +CMD gunicorn --workers=2 --name enterprise_catalog -c /edx/app/enterprise-catalog/enterprise_catalog/docker_gunicorn_configuration.py --log-file - --max-requests=1000 enterprise_catalog.wsgi:application ############################################################### # Create newrelic image used by the experimental docker shim. # @@ -104,4 +104,4 @@ EXPOSE 18161 USER root RUN pip install -r requirements/dev.txt USER app -CMD gunicorn --workers=2 --name enterprise-catalog -c /edx/app/enterprise-catalog/enterprise_catalog/docker_gunicorn_configuration.py --log-file - --max-requests=1000 enterprise_catalog.wsgi:application +CMD gunicorn --workers=2 --name enterprise_catalog -c /edx/app/enterprise-catalog/enterprise_catalog/docker_gunicorn_configuration.py --log-file - --max-requests=1000 enterprise_catalog.wsgi:application From 26f2141a7d882f82236a054f3f146d3c42f7e1a7 Mon Sep 17 00:00:00 2001 From: Usama Sadiq Date: Tue, 19 Nov 2024 15:06:13 +0500 Subject: [PATCH 14/18] fix: update enterprise-catalog WORKDIR (#61) --- dockerfiles/enterprise-catalog.Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dockerfiles/enterprise-catalog.Dockerfile b/dockerfiles/enterprise-catalog.Dockerfile index fcd506b..554693b 100644 --- a/dockerfiles/enterprise-catalog.Dockerfile +++ b/dockerfiles/enterprise-catalog.Dockerfile @@ -68,7 +68,8 @@ EXPOSE 8161 RUN useradd -m --shell /bin/false app -WORKDIR /edx/app/enterprise-catalog +WORKDIR /edx/app/enterprise-catalog/enterprise-catalog + RUN mkdir -p requirements RUN curl -L -o requirements/production.txt https://raw.githubusercontent.com/openedx/enterprise-catalog/master/requirements/production.txt From 519a4837a49ed1fcd5ca467e18ac82e103a7212f Mon Sep 17 00:00:00 2001 From: Usama Sadiq Date: Tue, 19 Nov 2024 15:33:01 +0500 Subject: [PATCH 15/18] Revert "fix: update enterprise-catalog WORKDIR (#61)" (#62) This reverts commit 26f2141a7d882f82236a054f3f146d3c42f7e1a7. --- dockerfiles/enterprise-catalog.Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dockerfiles/enterprise-catalog.Dockerfile b/dockerfiles/enterprise-catalog.Dockerfile index 554693b..fcd506b 100644 --- a/dockerfiles/enterprise-catalog.Dockerfile +++ b/dockerfiles/enterprise-catalog.Dockerfile @@ -68,8 +68,7 @@ EXPOSE 8161 RUN useradd -m --shell /bin/false app -WORKDIR /edx/app/enterprise-catalog/enterprise-catalog - +WORKDIR /edx/app/enterprise-catalog RUN mkdir -p requirements RUN curl -L -o requirements/production.txt https://raw.githubusercontent.com/openedx/enterprise-catalog/master/requirements/production.txt From 62b4cb15b4d5a49f41a81054b5cfb378f41295e4 Mon Sep 17 00:00:00 2001 From: Hunia Fatima Date: Thu, 21 Nov 2024 14:37:34 +0500 Subject: [PATCH 16/18] chore: add devstack.py file in dockerfiles (#54) * chore: pull devstack.py file from updated reference --- dockerfiles/course-discovery.Dockerfile | 2 ++ dockerfiles/credentials.Dockerfile | 3 +++ dockerfiles/ecommerce.Dockerfile | 2 ++ dockerfiles/edx-analytics-dashboard.Dockerfile | 2 ++ dockerfiles/edx-analytics-data-api.Dockerfile | 4 +++- dockerfiles/edx-notes-api.Dockerfile | 4 +++- dockerfiles/registrar.Dockerfile | 4 +++- dockerfiles/xqueue.Dockerfile | 4 +++- 8 files changed, 21 insertions(+), 4 deletions(-) diff --git a/dockerfiles/course-discovery.Dockerfile b/dockerfiles/course-discovery.Dockerfile index fc4725b..60d7d4d 100644 --- a/dockerfiles/course-discovery.Dockerfile +++ b/dockerfiles/course-discovery.Dockerfile @@ -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 diff --git a/dockerfiles/credentials.Dockerfile b/dockerfiles/credentials.Dockerfile index 3f78a4e..e60e145 100644 --- a/dockerfiles/credentials.Dockerfile +++ b/dockerfiles/credentials.Dockerfile @@ -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 RUN pip install -r /edx/app/credentials/credentials/requirements/dev.txt RUN make pull_translations diff --git a/dockerfiles/ecommerce.Dockerfile b/dockerfiles/ecommerce.Dockerfile index 3e6a571..8ba70dd 100644 --- a/dockerfiles/ecommerce.Dockerfile +++ b/dockerfiles/ecommerce.Dockerfile @@ -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 diff --git a/dockerfiles/edx-analytics-dashboard.Dockerfile b/dockerfiles/edx-analytics-dashboard.Dockerfile index da92fac..b333d71 100644 --- a/dockerfiles/edx-analytics-dashboard.Dockerfile +++ b/dockerfiles/edx-analytics-dashboard.Dockerfile @@ -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 npm@10.5.x diff --git a/dockerfiles/edx-analytics-data-api.Dockerfile b/dockerfiles/edx-analytics-data-api.Dockerfile index 63937c2..47ce0ae 100644 --- a/dockerfiles/edx-analytics-data-api.Dockerfile +++ b/dockerfiles/edx-analytics-data-api.Dockerfile @@ -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 diff --git a/dockerfiles/edx-notes-api.Dockerfile b/dockerfiles/edx-notes-api.Dockerfile index d42b26b..3fbbb64 100644 --- a/dockerfiles/edx-notes-api.Dockerfile +++ b/dockerfiles/edx-notes-api.Dockerfile @@ -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" diff --git a/dockerfiles/registrar.Dockerfile b/dockerfiles/registrar.Dockerfile index 22b4dde..56bb02f 100644 --- a/dockerfiles/registrar.Dockerfile +++ b/dockerfiles/registrar.Dockerfile @@ -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 CMD while true; do python ./manage.py runserver 0.0.0.0:18734; sleep 2; done diff --git a/dockerfiles/xqueue.Dockerfile b/dockerfiles/xqueue.Dockerfile index 3d0e2a4..7d0d71f 100644 --- a/dockerfiles/xqueue.Dockerfile +++ b/dockerfiles/xqueue.Dockerfile @@ -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 CMD while true; do python ./manage.py runserver 0.0.0.0:8040; sleep 2; done From a49cdd0655ec729871345c50a7df33d6b650fae1 Mon Sep 17 00:00:00 2001 From: Muhammad Umar Khan Date: Fri, 22 Nov 2024 18:40:06 +0500 Subject: [PATCH 17/18] chore: update user permissions in license manager --- dockerfiles/license-manager.Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dockerfiles/license-manager.Dockerfile b/dockerfiles/license-manager.Dockerfile index 3c43a57..f084ccb 100644 --- a/dockerfiles/license-manager.Dockerfile +++ b/dockerfiles/license-manager.Dockerfile @@ -96,6 +96,7 @@ RUN curl -L -o requirements/production.txt https://raw.githubusercontent.com/edx RUN pip install --no-cache-dir -r requirements/production.txt RUN curl -L https://github.com/edx/license-manager/archive/refs/heads/master.tar.gz | tar -xz --strip-components=1 +RUN curl -L -o license_manager/settings/devstack.py https://raw.githubusercontent.com/edx/devstack/master/py_configuration_files/license_manager.py RUN mkdir -p /edx/var/log @@ -112,10 +113,9 @@ RUN pip install newrelic CMD newrelic-admin run-program gunicorn --workers=2 --name license_manager -c /edx/app/license_manager/license_manager/docker_gunicorn_configuration.py --log-file - --max-requests=1000 license_manager.wsgi:application -FROM app as devstack +FROM app as dev USER root RUN pip install -r /edx/app/license_manager/requirements/dev.txt -USER app CMD gunicorn --reload --workers=2 --name license_manager -c /edx/app/license_manager/license_manager/docker_gunicorn_configuration.py --log-file - --max-requests=1000 license_manager.wsgi:application @@ -125,5 +125,4 @@ EXPOSE 18170 EXPOSE 18171 USER root RUN pip install -r /edx/app/license_manager/requirements/dev.txt -USER app CMD gunicorn --reload --workers=2 --name license_manager -c /edx/app/license_manager/license_manager/docker_gunicorn_configuration.py --log-file - --max-requests=1000 license_manager.wsgi:application From 02517ba3de915cd700ed72e04edb763570d577d8 Mon Sep 17 00:00:00 2001 From: Muhammad Soban Javed Date: Mon, 25 Nov 2024 17:24:41 +0300 Subject: [PATCH 18/18] fix: move devstack.py curl to apt place --- dockerfiles/edx-analytics-data-api.Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dockerfiles/edx-analytics-data-api.Dockerfile b/dockerfiles/edx-analytics-data-api.Dockerfile index 47ce0ae..c48d155 100644 --- a/dockerfiles/edx-analytics-data-api.Dockerfile +++ b/dockerfiles/edx-analytics-data-api.Dockerfile @@ -87,10 +87,6 @@ CMD ["gunicorn" , "-b", "0.0.0.0:8100", "--pythonpath", "/edx/app/analytics_api/ FROM base AS dev -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 RUN pip install -r ${ANALYTICS_API_CODE_DIR}/requirements/dev.txt @@ -100,6 +96,10 @@ RUN pip install -r ${ANALYTICS_API_CODE_DIR}/requirements/dev.txt # every time any bit of code is changed. RUN curl -L https://github.com/edx/edx-analytics-data-api/archive/refs/heads/master.tar.gz | tar -xz --strip-components=1 +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" + # Devstack related step for backwards compatibility RUN touch /edx/app/${ANALYTICS_API_SERVICE_NAME}/${ANALYTICS_API_SERVICE_NAME}_env