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 \