Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
Update Dockerfile for Python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Zulqarnain committed Sep 2, 2020
1 parent 4ddd714 commit 7346c84
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ before_install:
- docker-compose -f .travis/docker-compose-travis.yml up -d
- docker exec analytics_api bash -c "
source /edx/app/analytics_api/venvs/analytics_api/bin/activate &&
pip install setuptools==49.6.0 &&
make -C /edx/app/analytics_api/analytics_api travis"
# HACK: https://github.com/nodejs/docker-node/issues/1199
- rm package-lock.json
Expand Down
13 changes: 9 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
FROM ubuntu:xenial as openedx

RUN apt update && \
apt install -y git-core language-pack-en python3.5 python3-pip python3-dev libmysqlclient-dev && \
pip3 install --upgrade pip setuptools && \
apt-get install -y software-properties-common && \
apt-add-repository -y ppa:deadsnakes/ppa && apt-get update && \
apt-get install -y curl && \
apt-get upgrade -qy && \
apt install -y git-core language-pack-en build-essential python3.8-dev python3.8-distutils libmysqlclient-dev && \
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
python3.8 get-pip.py && python3.8 -m pip install --upgrade pip setuptools && \
rm -rf /var/lib/apt/lists/*

RUN locale-gen en_US.UTF-8
Expand All @@ -13,7 +18,7 @@ ENV ANALYTICS_DASHBOARD_CFG /edx/etc/insights.yml

WORKDIR /edx/app/analytics_dashboard
COPY requirements /edx/app/analytics_dashboard/requirements
RUN pip3 install -r requirements/production.txt
RUN python3.8 -m pip install -r requirements/production.txt

EXPOSE 8110
CMD gunicorn -b 127.0.0.1:8110 --workers 2 --timeout=300 analytics_dashboard.wsgi:application
Expand All @@ -23,6 +28,6 @@ USER app
COPY . /edx/app/analytics_dashboard

FROM openedx as edx.org
RUN pip3 install newrelic
RUN python3.8 -m pip install newrelic
CMD newrelic-admin run-program gunicorn -b 127.0.0.1:8110 --workers 2 --timeout=300 analytics_dashboard.wsgi:application

0 comments on commit 7346c84

Please sign in to comment.