-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: corrected requirements dir path for enterprise_access(#45)
* fix: corrected requirements dir path for enterprise_access
- Loading branch information
1 parent
58e8a6e
commit 7001d68
Showing
1 changed file
with
15 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM ubuntu:focal as app | ||
FROM ubuntu:focal AS app | ||
MAINTAINER [email protected] | ||
Check warning on line 2 in dockerfiles/enterprise-access.Dockerfile GitHub Actions / build-and-push-imageThe MAINTAINER instruction is deprecated, use a label instead to define an image author
|
||
|
||
|
||
|
@@ -81,24 +81,24 @@ RUN ./configure && make && make install && ldconfig | |
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 DJANGO_SETTINGS_MODULE enterprise_access.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_access.settings.production | ||
|
||
EXPOSE 18270 | ||
EXPOSE 18271 | ||
RUN useradd -m --shell /bin/false app | ||
|
||
WORKDIR /edx/app/enterprise-access | ||
|
||
RUN mkdir -p /requirements | ||
RUN mkdir -p requirements | ||
|
||
RUN curl -L -o /requirements/pip.txt https://raw.githubusercontent.com/openedx/enterprise-access/main/requirements/pip.txt | ||
RUN curl -L -o /requirements/production.txt https://raw.githubusercontent.com/openedx/enterprise-access/main/requirements/production.txt | ||
RUN curl -L -o requirements/pip.txt https://raw.githubusercontent.com/openedx/enterprise-access/main/requirements/pip.txt | ||
RUN curl -L -o requirements/production.txt https://raw.githubusercontent.com/openedx/enterprise-access/main/requirements/production.txt | ||
# Dependencies are installed as root so they cannot be modified by the application user. | ||
RUN pip install -r /requirements/pip.txt | ||
RUN pip install -r /requirements/production.txt | ||
RUN pip install -r requirements/pip.txt | ||
RUN pip install -r requirements/production.txt | ||
|
||
RUN mkdir -p /edx/var/log | ||
|
||
|
@@ -111,12 +111,14 @@ 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-access -c /edx/app/enterprise-access/enterprise_access/docker_gunicorn_configuration.py --log-file - --max-requests=1000 enterprise_access.wsgi:application | ||
Check warning on line 112 in dockerfiles/enterprise-access.Dockerfile GitHub Actions / build-and-push-imageJSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals
|
||
|
||
FROM app as newrelic | ||
FROM app AS newrelic | ||
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 | ||
FROM app AS devstack | ||
|
||
USER root | ||
RUN pip install -r /requirements/dev.txt | ||
RUN pip install -r requirements/dev.txt | ||
|
||
USER app | ||
CMD 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 | ||
Check warning on line 124 in dockerfiles/enterprise-access.Dockerfile GitHub Actions / build-and-push-imageJSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals
|