Upgrade to Koa
This commit is contained in:
parent
b1e14d871f
commit
970dafe87b
@ -3,7 +3,7 @@ variables:
|
|||||||
TUTOR_IMAGES: xqueue
|
TUTOR_IMAGES: xqueue
|
||||||
TUTOR_PYPI_PACKAGE: tutor-xqueue
|
TUTOR_PYPI_PACKAGE: tutor-xqueue
|
||||||
TUTOR_PYPI_PRIVATE_PACKAGE: tutor-xqueue
|
TUTOR_PYPI_PRIVATE_PACKAGE: tutor-xqueue
|
||||||
OPENEDX_RELEASE: juniper
|
OPENEDX_RELEASE: koa
|
||||||
|
|
||||||
include:
|
include:
|
||||||
- project: 'community/tutor-ci'
|
- project: 'community/tutor-ci'
|
||||||
|
|||||||
2
setup.py
2
setup.py
@ -32,7 +32,7 @@ setup(
|
|||||||
packages=find_packages(exclude=["tests*"]),
|
packages=find_packages(exclude=["tests*"]),
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
python_requires=">=3.5",
|
python_requires=">=3.5",
|
||||||
install_requires=["tutor-openedx>=10.0.0,<11.0.0", "requests"],
|
install_requires=["tutor-openedx>=11.0.0,<12.0.0", "requests"],
|
||||||
entry_points={"tutor.plugin.v0": ["xqueue = tutorxqueue.plugin"]},
|
entry_points={"tutor.plugin.v0": ["xqueue = tutorxqueue.plugin"]},
|
||||||
classifiers=[
|
classifiers=[
|
||||||
"Development Status :: 3 - Alpha",
|
"Development Status :: 3 - Alpha",
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
__version__ = "10.1.2"
|
__version__ = "11.0.0"
|
||||||
|
|||||||
4
tutorxqueue/patches/caddyfile
Normal file
4
tutorxqueue/patches/caddyfile
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Xqueue
|
||||||
|
{{ XQUEUE_HOST }}{% if not ENABLE_HTTPS %}:80{% endif %} {
|
||||||
|
reverse_proxy nginx:80
|
||||||
|
}
|
||||||
@ -1 +0,0 @@
|
|||||||
certbot certonly --standalone -n --agree-tos -m admin@{{ LMS_HOST }} -d {{ XQUEUE_HOST }}
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
- host: {{ XQUEUE_HOST }}
|
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- backend:
|
|
||||||
serviceName: nginx
|
|
||||||
servicePort: {% if ACTIVATE_HTTPS %}443{% else %}80{% endif %}
|
|
||||||
@ -1 +0,0 @@
|
|||||||
- {{ XQUEUE_HOST }}
|
|
||||||
@ -3,35 +3,16 @@ upstream xqueue-backend {
|
|||||||
server xqueue:8000 fail_timeout=0;
|
server xqueue:8000 fail_timeout=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
{% if ACTIVATE_HTTPS %}
|
|
||||||
server {
|
server {
|
||||||
server_name {{ XQUEUE_HOST }};
|
listen 80;
|
||||||
listen 80;
|
server_name {{ XQUEUE_HOST }};
|
||||||
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 xqueue.localhost {{ XQUEUE_HOST }};
|
|
||||||
|
|
||||||
{% if ACTIVATE_HTTPS and not WEB_PROXY %}
|
|
||||||
ssl_certificate /etc/letsencrypt/live/{{ XQUEUE_HOST }}/fullchain.pem;
|
|
||||||
ssl_certificate_key /etc/letsencrypt/live/{{ XQUEUE_HOST }}/privkey.pem;
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
# Disables server version feedback on pages and in headers
|
# Disables server version feedback on pages and in headers
|
||||||
server_tokens off;
|
server_tokens off;
|
||||||
|
|
||||||
location / {
|
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_set_header Host $http_host;
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
|
|
||||||
proxy_pass http://xqueue-backend;
|
proxy_pass http://xqueue-backend;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -114,7 +114,7 @@ class Client:
|
|||||||
|
|
||||||
self.base_url = url
|
self.base_url = url
|
||||||
if not self.base_url:
|
if not self.base_url:
|
||||||
scheme = "https" if user_config["ACTIVATE_HTTPS"] else "http"
|
scheme = "https" if user_config["ENABLE_HTTPS"] else "http"
|
||||||
host = user_config["XQUEUE_HOST"]
|
host = user_config["XQUEUE_HOST"]
|
||||||
self.base_url = "{}://{}".format(scheme, host)
|
self.base_url = "{}://{}".format(scheme, host)
|
||||||
self.login()
|
self.login()
|
||||||
|
|||||||
@ -3,7 +3,6 @@ from .settings import *
|
|||||||
ALLOWED_HOSTS = [
|
ALLOWED_HOSTS = [
|
||||||
"{{ XQUEUE_HOST }}",
|
"{{ XQUEUE_HOST }}",
|
||||||
"xqueue",
|
"xqueue",
|
||||||
"xqueue.localhost",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user