forked from openedx/edx-platform
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Dockerfile.tutor
81 lines (69 loc) · 3.79 KB
/
Dockerfile.tutor
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Tahoe Dockerfile production image
# Start off from: https://github.com/overhangio/tutor/blob/v10.5.3/tutor/templates/build/openedx/Dockerfile
# `overhangio/openedx:10.5.3` is the last version to support Juniper
FROM overhangio/openedx:10.5.3 as edxapp-build
MAINTAINER Appsembler <[email protected]>
# TODO: Consolidate requirements in a shared Ansible/Docker place in `edx-configs`
RUN rm -rf /openedx/edx-platform/
COPY . /openedx/edx-platform
WORKDIR /openedx/edx-platform
# Install standard Open edX python requirements
RUN pip install -r ./requirements/edx/base.txt \
&& pip install -r ./requirements/edx/appsembler.txt
# Sync with `edx-configs` `appsembler/tahoe/us/juniper/prod/files/server-vars.yml`
RUN echo "Installing pip packages:" \
&& pip install xblock-launchcontainer==4.0.0 \
&& pip install xblock-prismjs==0.1.4 \
&& pip install xblock-problem-builder==4.1.9 \
&& echo \
&& pip install https://github.com/appsembler/openedx-scorm-xblock/archive/refs/tags/v15.1.0-appsembler-tahoe-compat.tar.gz \
&& pip install https://github.com/appsembler/pdfXBlock/archive/v0.3.1.tar.gz \
&& pip install https://github.com/edx/xblock-free-text-response/archive/4149cc450.tar.gz \
&& pip install https://github.com/pmitros/FeedbackXBlock/archive/v1.1.tar.gz \
&& pip install https://github.com/ubc/ubcpi/archive/1.0.0.tar.gz \
&& echo \
&& pip install course-access-groups==0.6.1 \
&& pip install figures==0.4.4 \
&& pip install tahoe-figures-plugins==0.1.1 \
&& pip install tahoe-lti==0.3.0 \
&& pip install tahoe-scorm==0.1.4 \
&& pip install xblock-grade-fetcher==0.5.0 \
&& pip install django-manage-admins==0.1.0 \
&& echo \
&& pip install https://github.com/appsembler/openedx-completion-aggregator/archive/3.0.3-2023-mar-27-revert-use-of-task-track.tar.gz \
&& echo "Finished installing pip packages."
EXPOSE 8000
FROM edxapp-build as edxapp-build-experimental
# Collect production assets. By default, only assets from the default theme
# will be processed. This makes the docker image lighter and faster to build.
# Only the custom themes added to /openedx/themes will be compiled.
# Here, we don't run "paver update_assets" which is slow, compiles all themes
# and requires a complex settings file. Instead, we decompose the commands
# and run each one individually to collect the production static assets to
# /openedx/staticfiles.
# We need to rely on a separate openedx-assets command to accelerate asset processing.
# For instance, we don't want to run all steps of asset collection every time the theme
# is modified.
RUN rm -rf /openedx/staticfiles/ \
&& mkdir --mode=755 /openedx/staticfiles/ \
&& npm install --verbose --registry=https://registry.npmjs.org/ \
&& openedx-assets xmodule \
&& openedx-assets npm \
&& openedx-assets webpack --env=prod \
&& openedx-assets common
# Sync with `edx-configs` `appsembler/tahoe/us/juniper/staging/files/server-vars.yml`
RUN echo "Installing pip packages:" \
&& pip install gestore==0.1.0-dev3 \
&& pip install xblock-grade-fetcher==0.2 \
&& echo "Finished installing pip packages."
RUN mkdir -p /openedx/themes/ \
&& git clone https://github.com/appsembler/edx-theme-codebase.git --branch=juniper/main /openedx/themes/edx-theme-codebase \
&& git clone https://github.com/appsembler/edx-theme-customers.git --branch=juniper/tahoe /openedx/themes/edx-theme-codebase/customer_specific \
&& openedx-assets themes \
&& openedx-assets collect --settings=tutor_assets \
&& rdfind -makesymlinks true -followsymlinks true /openedx/staticfiles/ \
&& mkdir -p /edx/var/edxapp \
&& ln -sd /openedx/themes /edx/var/edxapp/themes \
&& echo "Finished compiling theme."
# TODO: Compile i18n using tutor.i18n settings like `overhangio/openedx:10.5.3`
EXPOSE 8000