diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9118fb4..cd4a793 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ variables: TUTOR_PLUGIN: notes TUTOR_IMAGES: notes TUTOR_PYPI_PACKAGE: tutor-notes - OPENEDX_RELEASE: juniper + OPENEDX_RELEASE: koa include: - project: 'community/tutor-ci' diff --git a/README.rst b/README.rst index aa72659..eaee5e1 100644 --- a/README.rst +++ b/README.rst @@ -1,9 +1,9 @@ Students notes plugin for `Tutor `_ =================================================================== -This is a plugin for `Tutor `_ to easily add the `Open edX note-taking app `_ to an Open edX platform. This app allows students to annotate portions of the courseware (see `the official documentation `_). +This is a plugin for `Tutor `_ to easily add the `Open edX note-taking app `_ to an Open edX platform. This app allows students to annotate portions of the courseware (see `the official documentation `_). -.. image:: https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-juniper.master/_images/SFD_SN_bodyexample.png +.. image:: https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-koa.master/_images/SFD_SN_bodyexample.png :alt: Notes in action Installation diff --git a/setup.py b/setup.py index a2848c3..bc0774e 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ setup( packages=find_packages(exclude=["tests*"]), include_package_data=True, python_requires=">=3.5", - install_requires=["tutor-openedx>=10.0.0,<11.0.0"], + install_requires=["tutor-openedx>=11.0.0,<12.0.0"], entry_points={"tutor.plugin.v0": ["notes = tutornotes.plugin"]}, classifiers=[ "Development Status :: 5 - Production/Stable", diff --git a/tutornotes/__about__.py b/tutornotes/__about__.py index 656e1e0..5b46116 100644 --- a/tutornotes/__about__.py +++ b/tutornotes/__about__.py @@ -1 +1 @@ -__version__ = "10.1.4" +__version__ = "11.0.0" diff --git a/tutornotes/patches/caddyfile b/tutornotes/patches/caddyfile new file mode 100644 index 0000000..e23cf56 --- /dev/null +++ b/tutornotes/patches/caddyfile @@ -0,0 +1,4 @@ +# Notes +{{ NOTES_HOST }}{% if not ENABLE_HTTPS %}:80{% endif %} { + reverse_proxy nginx:80 +} \ No newline at end of file diff --git a/tutornotes/patches/https-create b/tutornotes/patches/https-create deleted file mode 100644 index d6d4930..0000000 --- a/tutornotes/patches/https-create +++ /dev/null @@ -1 +0,0 @@ -certbot certonly --standalone -n --agree-tos -m admin@{{ LMS_HOST }} -d {{ NOTES_HOST }} \ No newline at end of file diff --git a/tutornotes/patches/k8s-ingress-rules b/tutornotes/patches/k8s-ingress-rules deleted file mode 100644 index 4d3c6a4..0000000 --- a/tutornotes/patches/k8s-ingress-rules +++ /dev/null @@ -1,6 +0,0 @@ -- host: {{ NOTES_HOST }} - http: - paths: - - backend: - serviceName: nginx - servicePort: {% if ACTIVATE_HTTPS %}443{% else %}80{% endif %} \ No newline at end of file diff --git a/tutornotes/patches/k8s-ingress-tls-hosts b/tutornotes/patches/k8s-ingress-tls-hosts deleted file mode 100644 index 33100be..0000000 --- a/tutornotes/patches/k8s-ingress-tls-hosts +++ /dev/null @@ -1 +0,0 @@ -- {{ NOTES_HOST }} \ No newline at end of file diff --git a/tutornotes/patches/local-docker-compose-jobs-services b/tutornotes/patches/local-docker-compose-jobs-services index fa97b99..d0cf3df 100644 --- a/tutornotes/patches/local-docker-compose-jobs-services +++ b/tutornotes/patches/local-docker-compose-jobs-services @@ -4,4 +4,4 @@ notes-job: DJANGO_SETTINGS_MODULE: notesserver.settings.tutor volumes: - ../plugins/notes/apps/settings/tutor.py:/openedx/edx-notes-api/notesserver/settings/tutor.py:ro - depends_on: {{ [("mysql", ACTIVATE_MYSQL)]|list_if }} + depends_on: {{ [("mysql", RUN_MYSQL)]|list_if }} diff --git a/tutornotes/patches/local-docker-compose-services b/tutornotes/patches/local-docker-compose-services index 5525873..8ba4cfd 100644 --- a/tutornotes/patches/local-docker-compose-services +++ b/tutornotes/patches/local-docker-compose-services @@ -7,4 +7,4 @@ notes: - ../plugins/notes/apps/settings/tutor.py:/openedx/edx-notes-api/notesserver/settings/tutor.py:ro - ../../data/notes:/openedx/data restart: unless-stopped - depends_on: {{ [("mysql", ACTIVATE_MYSQL)]|list_if }} + depends_on: {{ [("mysql", RUN_MYSQL)]|list_if }} diff --git a/tutornotes/patches/nginx-extra b/tutornotes/patches/nginx-extra index 3499ba5..4e3c474 100644 --- a/tutornotes/patches/nginx-extra +++ b/tutornotes/patches/nginx-extra @@ -3,35 +3,16 @@ upstream notes-backend { server notes:8000 fail_timeout=0; } -{% if ACTIVATE_HTTPS %} server { - server_name {{ NOTES_HOST }}; - listen 80; - return 301 https://$server_name$request_uri; -} -{% endif %} - -server { - {% if ACTIVATE_HTTPS %}listen 443 {{ "" if WEB_PROXY else "ssl" }};{% else %}listen 80;{% endif %} - server_name notes.localhost {{ NOTES_HOST }}; - - {% if ACTIVATE_HTTPS and not WEB_PROXY %} - ssl_certificate /etc/letsencrypt/live/{{ NOTES_HOST }}/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/{{ NOTES_HOST }}/privkey.pem; - {% endif %} + listen 80; + server_name {{ NOTES_HOST }}; # Disables server version feedback on pages and in headers server_tokens off; location / { - {% if not WEB_PROXY %} - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Forwarded-Port $server_port; - proxy_set_header X-Forwarded-For $remote_addr; - {% endif %} proxy_set_header Host $http_host; proxy_redirect off; - proxy_pass http://notes-backend; } } \ No newline at end of file diff --git a/tutornotes/patches/openedx-lms-production-settings b/tutornotes/patches/openedx-lms-production-settings index fdb0352..8d185e5 100644 --- a/tutornotes/patches/openedx-lms-production-settings +++ b/tutornotes/patches/openedx-lms-production-settings @@ -1 +1 @@ -EDXNOTES_PUBLIC_API = "{{ "https" if ACTIVATE_HTTPS else "http" }}://{{ NOTES_HOST }}/api/v1" \ No newline at end of file +EDXNOTES_PUBLIC_API = "{{ "https" if ENABLE_HTTPS else "http" }}://{{ NOTES_HOST }}/api/v1" \ No newline at end of file diff --git a/tutornotes/patches/proxy-apache b/tutornotes/patches/proxy-apache deleted file mode 100644 index 083ea89..0000000 --- a/tutornotes/patches/proxy-apache +++ /dev/null @@ -1,27 +0,0 @@ -{% if ACTIVATE_HTTPS %} - - ServerName {{ NOTES_HOST }} - Redirect / https://notes.{{ LMS_HOST }}/ - - - - ServerName {{ NOTES_HOST }} - SSLEngine on - SSLCertificateFile /etc/letsencrypt/live/{{ NOTES_HOST }}/fullchain.pem - SSLCertificateKeyFile /etc/letsencrypt/live/{{ NOTES_HOST }}/privkey.pem - - ProxyPreserveHost On - ProxyRequests On - ProxyPass / http://localhost:{{ NGINX_HTTP_PORT }}/ - ProxyPassReverse / http://localhost:{{ NGINX_HTTP_PORT }}/ - -{% else %} - - ServerName {{ NOTES_HOST }} - - ProxyPreserveHost On - ProxyRequests On - ProxyPass / http://localhost:{{ NGINX_HTTP_PORT }}/ - ProxyPassReverse / http://localhost:{{ NGINX_HTTP_PORT }}/ - -{% endif %} diff --git a/tutornotes/patches/proxy-nginx b/tutornotes/patches/proxy-nginx deleted file mode 100644 index bd1ed11..0000000 --- a/tutornotes/patches/proxy-nginx +++ /dev/null @@ -1,33 +0,0 @@ -server { - listen 80; - server_name {{ NOTES_HOST }}; - - server_tokens off; - location / { - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Forwarded-Port $server_port; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header Host $http_host; - proxy_redirect off; - proxy_pass http://localhost:{{ NGINX_HTTP_PORT }}; - } -} -{% if ACTIVATE_HTTPS %} -server { - listen 443 ssl; - server_name {{ NOTES_HOST }}; - - ssl_certificate /etc/letsencrypt/live/{{ NOTES_HOST }}/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/{{ NOTES_HOST }}/privkey.pem; - - server_tokens off; - location / { - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Forwarded-Port $server_port; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header Host $http_host; - proxy_redirect off; - proxy_pass http://localhost:{{ NGINX_HTTPS_PORT }}; - } -} -{% endif %} \ No newline at end of file