Skip to content

Commit

Permalink
Merge pull request #74 from overhangio/redwood
Browse files Browse the repository at this point in the history
Upgrade to Redwood
  • Loading branch information
regisb authored Jun 19, 2024
2 parents c939b8a + 48c13d7 commit 790513e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 9 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ instructions, because git commits are used to generate release notes:

<!-- scriv-insert-here -->

<a id='changelog-18.0.0'></a>
## v18.0.0 (2024-05-14)

- 💥[Feature] Upgrade to Redwood. (by @Faraz32123)
- 💥[Feature] Upgrade Python version to 3.12.2. (by @Faraz32123)
- [BugFix] Fix wrong mime type by adding mime-support dependency. (by @Faraz32123)

<a id='changelog-17.0.1'></a>
## v17.0.1 (2024-04-25)

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
long_description_content_type="text/x-rst",
packages=find_packages(exclude=["tests*"]),
include_package_data=True,
install_requires=["tutor>=17.0.0,<18.0.0"],
extras_require={"dev": "tutor[dev]>=17.0.0,<18.0.0"},
install_requires=["tutor>=18.0.0,<19.0.0"],
extras_require={"dev": "tutor[dev]>=18.0.0,<19.0.0"},
python_requires=">=3.8",
entry_points={"tutor.plugin.v1": ["discovery = tutordiscovery.plugin"]},
classifiers=[
Expand Down
2 changes: 1 addition & 1 deletion tutordiscovery/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "17.0.1"
__version__ = "18.0.0"
24 changes: 18 additions & 6 deletions tutordiscovery/templates/discovery/build/discovery/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt update && \
apt install -y curl git-core gettext language-pack-en python3 python3-dev python3-pip python3-venv \
apt install -y curl git-core gettext language-pack-en \
build-essential libcairo2 libffi-dev libmysqlclient-dev libxml2-dev libxslt-dev libjpeg-dev libssl-dev \
pkg-config
pkg-config libsqlite3-dev mime-support
ENV LC_ALL en_US.UTF-8

ARG APP_USER_ID=1000
Expand All @@ -27,15 +27,27 @@ WORKDIR /openedx/discovery
RUN echo "{}" > /openedx/config.yml
ENV DISCOVERY_CFG /openedx/config.yml

# Install python venv
RUN python3 -m venv ../venv/
# Install pyenv
# https://www.python.org/downloads/
# https://github.com/pyenv/pyenv/releases
ARG PYTHON_VERSION=3.12.2
ENV PYENV_ROOT /opt/pyenv
# root user is required for below 2 steps, as app user gets permission denied.
USER root
RUN git clone https://github.com/pyenv/pyenv $PYENV_ROOT --branch v2.3.36 --depth 1
# Install Python
RUN $PYENV_ROOT/bin/pyenv install $PYTHON_VERSION
USER app

# Create virtualenv
RUN $PYENV_ROOT/versions/$PYTHON_VERSION/bin/python -m venv /openedx/venv
ENV PATH "/openedx/venv/bin:$PATH"

RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared pip install \
# https://pypi.org/project/setuptools/
# https://pypi.org/project/pip/
# https://pypi.org/project/wheel/
setuptools==68.2.2 pip==23.2.1. wheel==0.41.2
setuptools==69.1.1 pip==24.0 wheel==0.43.0

# Install a recent version of nodejs
RUN pip install nodeenv==1.8.0
Expand All @@ -61,7 +73,7 @@ RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared pip install \
# Use redis as a django cache https://pypi.org/project/django-redis/
django-redis==5.4.0 \
# uwsgi server https://pypi.org/project/uWSGI/
uwsgi==2.0.22
uwsgi==2.0.24

{% if DISCOVERY_ATLAS_PULL %}
# Pull translations. Support the OEP-58 proposal behind a feature flag until it's fully implemented.
Expand Down

0 comments on commit 790513e

Please sign in to comment.