feat: upgrade to Maple
This commit is contained in:
parent
7dce20044c
commit
29218141d7
@ -2,7 +2,7 @@ variables:
|
||||
TUTOR_PLUGIN: notes
|
||||
TUTOR_IMAGES: notes
|
||||
TUTOR_PYPI_PACKAGE: tutor-notes
|
||||
OPENEDX_RELEASE: lilac
|
||||
OPENEDX_RELEASE: maple
|
||||
GITHUB_REPO: overhangio/tutor-notes
|
||||
|
||||
include:
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
Students notes plugin for `Tutor <https://docs.tutor.overhang.io>`_
|
||||
===================================================================
|
||||
|
||||
This is a plugin for `Tutor <https://docs.tutor.overhang.io>`_ to easily add the `Open edX note-taking app <https://github.com/edx/edx-notes-api>`_ to an Open edX platform. This app allows students to annotate portions of the courseware (see `the official documentation <https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-lilac.master/exercises_tools/notes.html>`_).
|
||||
This is a plugin for `Tutor <https://docs.tutor.overhang.io>`_ to easily add the `Open edX note-taking app <https://github.com/edx/edx-notes-api>`_ to an Open edX platform. This app allows students to annotate portions of the courseware (see `the official documentation <https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-maple.master/exercises_tools/notes.html>`_).
|
||||
|
||||
.. image:: https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-lilac.master/_images/SFD_SN_bodyexample.png
|
||||
.. image:: https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-maple.master/_images/SFD_SN_bodyexample.png
|
||||
:alt: Notes in action
|
||||
|
||||
Installation
|
||||
|
||||
3
setup.py
3
setup.py
@ -31,7 +31,7 @@ setup(
|
||||
packages=find_packages(exclude=["tests*"]),
|
||||
include_package_data=True,
|
||||
python_requires=">=3.5",
|
||||
install_requires=["tutor>=12.0.0,<13.0.0"],
|
||||
install_requires=["tutor>=13.0.0,<14.0.0"],
|
||||
entry_points={"tutor.plugin.v0": ["notes = tutornotes.plugin"]},
|
||||
classifiers=[
|
||||
"Development Status :: 5 - Production/Stable",
|
||||
@ -39,7 +39,6 @@ setup(
|
||||
"License :: OSI Approved :: GNU Affero General Public License v3",
|
||||
"Operating System :: OS Independent",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3.5",
|
||||
"Programming Language :: Python :: 3.6",
|
||||
"Programming Language :: Python :: 3.7",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
|
||||
@ -1,2 +1 @@
|
||||
__version__ = "12.0.0"
|
||||
|
||||
__version__ = "13.0.0"
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# Notes
|
||||
{{ NOTES_HOST }}{% if not ENABLE_HTTPS %}:80{% endif %} {
|
||||
reverse_proxy nginx:80
|
||||
{{ NOTES_HOST }}{$default_site_port} {
|
||||
import proxy "notes:8000"
|
||||
}
|
||||
@ -1 +0,0 @@
|
||||
"ENABLE_EDXNOTES": true
|
||||
@ -14,6 +14,9 @@ spec:
|
||||
labels:
|
||||
app.kubernetes.io/name: notes
|
||||
spec:
|
||||
securityContext:
|
||||
runAsUser: 1000
|
||||
runAsGroup: 1000
|
||||
containers:
|
||||
- name: notes
|
||||
image: {{ NOTES_DOCKER_IMAGE }}
|
||||
@ -23,9 +26,11 @@ spec:
|
||||
- name: DJANGO_SETTINGS_MODULE
|
||||
value: notesserver.settings.tutor
|
||||
volumeMounts:
|
||||
- mountPath: /openedx/edx-notes-api/notesserver/settings/tutor.py
|
||||
- mountPath: /app/edx-notes-api/notesserver/settings/tutor.py
|
||||
name: settings
|
||||
subPath: tutor.py
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
volumes:
|
||||
- name: settings
|
||||
configMap:
|
||||
|
||||
@ -16,7 +16,7 @@ spec:
|
||||
- name: DJANGO_SETTINGS_MODULE
|
||||
value: notesserver.settings.tutor
|
||||
volumeMounts:
|
||||
- mountPath: /openedx/edx-notes-api/notesserver/settings/tutor.py
|
||||
- mountPath: /app/edx-notes-api/notesserver/settings/tutor.py
|
||||
name: settings
|
||||
subPath: tutor.py
|
||||
volumes:
|
||||
|
||||
@ -3,8 +3,10 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: notes
|
||||
labels:
|
||||
app.kubernetes.io/name: caddy
|
||||
spec:
|
||||
type: NodePort
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 8000
|
||||
protocol: TCP
|
||||
|
||||
@ -3,5 +3,5 @@ notes-job:
|
||||
environment:
|
||||
DJANGO_SETTINGS_MODULE: notesserver.settings.tutor
|
||||
volumes:
|
||||
- ../plugins/notes/apps/settings/tutor.py:/openedx/edx-notes-api/notesserver/settings/tutor.py:ro
|
||||
- ../plugins/notes/apps/settings/tutor.py:/app/edx-notes-api/notesserver/settings/tutor.py:ro
|
||||
depends_on: {{ [("mysql", RUN_MYSQL)]|list_if }}
|
||||
|
||||
@ -4,7 +4,16 @@ notes:
|
||||
environment:
|
||||
DJANGO_SETTINGS_MODULE: notesserver.settings.tutor
|
||||
volumes:
|
||||
- ../plugins/notes/apps/settings/tutor.py:/openedx/edx-notes-api/notesserver/settings/tutor.py:ro
|
||||
- ../../data/notes:/openedx/data
|
||||
- ../plugins/notes/apps/settings/tutor.py:/app/edx-notes-api/notesserver/settings/tutor.py:ro
|
||||
- ../../data/notes:/app/data
|
||||
restart: unless-stopped
|
||||
depends_on: {{ [("mysql", RUN_MYSQL)]|list_if }}
|
||||
depends_on:
|
||||
- notes-permissions
|
||||
{% if RUN_MYSQL %}- mysql{% endif %}
|
||||
|
||||
notes-permissions:
|
||||
image: {{ DOCKER_IMAGE_PERMISSIONS }}
|
||||
command: ["1000", "/app/notes"]
|
||||
restart: on-failure
|
||||
volumes:
|
||||
- ../../data/notes:/app/notes
|
||||
|
||||
@ -1,18 +0,0 @@
|
||||
### Student notes service
|
||||
upstream notes-backend {
|
||||
server notes:8000 fail_timeout=0;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name {{ NOTES_HOST }};
|
||||
|
||||
# Disables server version feedback on pages and in headers
|
||||
server_tokens off;
|
||||
|
||||
location / {
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_redirect off;
|
||||
proxy_pass http://notes-backend;
|
||||
}
|
||||
}
|
||||
@ -1,3 +1,3 @@
|
||||
# Notes
|
||||
# Student notes
|
||||
EDXNOTES_CLIENT_NAME = "notes"
|
||||
EDXNOTES_INTERNAL_API = "http://notes:8000/api/v1"
|
||||
@ -4,13 +4,19 @@ MAINTAINER Overhang.io <contact@overhang.io>
|
||||
RUN apt update && \
|
||||
apt upgrade -y && \
|
||||
# python 3.8
|
||||
apt install -y language-pack-en git python3 python3-pip libmysqlclient-dev
|
||||
apt install -y language-pack-en git python3 python3-pip python3-venv libmysqlclient-dev
|
||||
RUN ln -s /usr/bin/python3 /usr/bin/python
|
||||
|
||||
RUN mkdir /openedx
|
||||
RUN git clone https://github.com/edx/edx-notes-api --branch {{ OPENEDX_COMMON_VERSION }} --depth 1 /openedx/edx-notes-api
|
||||
WORKDIR /openedx/edx-notes-api
|
||||
ARG APP_USER_ID=1000
|
||||
RUN useradd --home-dir /app --create-home --shell /bin/bash --uid ${APP_USER_ID} app
|
||||
USER ${APP_USER_ID}
|
||||
|
||||
RUN git clone https://github.com/edx/edx-notes-api --branch {{ OPENEDX_COMMON_VERSION }} --depth 1 /app/edx-notes-api
|
||||
WORKDIR /app/edx-notes-api
|
||||
|
||||
RUN python -m venv /app/venv
|
||||
ENV PATH /app/venv/bin:${PATH}
|
||||
RUN pip install setuptools==44.1.0 pip==20.3.4 wheel==0.37.0
|
||||
RUN pip3 install -r requirements/base.txt
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user