feat: upgrade to maple

This commit is contained in:
Régis Behmo 2021-11-15 08:38:52 +01:00
parent 17841b207a
commit fb9e666814
8 changed files with 29 additions and 28 deletions

View File

@ -2,7 +2,7 @@ variables:
TUTOR_PLUGIN: xqueue
TUTOR_IMAGES: xqueue
TUTOR_PYPI_PACKAGE: tutor-xqueue
OPENEDX_RELEASE: lilac
OPENEDX_RELEASE: maple
GITHUB_REPO: overhangio/tutor-xqueue
include:

View File

@ -32,7 +32,7 @@ setup(
packages=find_packages(exclude=["tests*"]),
include_package_data=True,
python_requires=">=3.5",
install_requires=["tutor>=12.0.0,<13.0.0", "requests"],
install_requires=["tutor>=13.0.0,<14.0.0", "requests"],
entry_points={"tutor.plugin.v0": ["xqueue = tutorxqueue.plugin"]},
classifiers=[
"Development Status :: 3 - Alpha",

View File

@ -1 +1 @@
__version__ = "12.1.0"
__version__ = "13.0.0"

View File

@ -1,4 +1,4 @@
# Xqueue
{{ XQUEUE_HOST }}{% if not ENABLE_HTTPS %}:80{% endif %} {
reverse_proxy nginx:80
}
{{ XQUEUE_HOST }}{$default_site_port} {
import proxy "xqueue:8000"
}

View File

@ -9,6 +9,13 @@ xqueue:
restart: unless-stopped
depends_on: {{ [("mysql", RUN_MYSQL)]|list_if }}
xqueue-permissions:
image: {{ DOCKER_IMAGE_PERMISSIONS }}
command: ["1000", "/openedx/xqueue"]
restart: on-failure
volumes:
- ../../data/xqueue/media:/openedx/xqueue
xqueue-consumer:
image: {{ XQUEUE_DOCKER_IMAGE }}
volumes:

View File

@ -1,18 +0,0 @@
### Xqueue
upstream xqueue-backend {
server xqueue:8000 fail_timeout=0;
}
server {
listen 80;
server_name {{ XQUEUE_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://xqueue-backend;
}
}

View File

@ -60,7 +60,11 @@ def command():
"-u",
"--url",
envvar="TUTOR_XQUEUE_URL",
help="Xqueue server base url. By default, this value will be defined from the plugin configuration. Alternatively, this value can be defined from the TUTOR_XQUEUE_URL environment variable.",
help=(
"Xqueue server base url. By default, this value will be defined from "
"the plugin configuration. Alternatively, this value can be defined "
"from the TUTOR_XQUEUE_URL environment variable."
),
)
def submissions(context, queue, url):
context.queue = queue

View File

@ -3,15 +3,23 @@ MAINTAINER Overhang.io <contact@overhang.io>
RUN apt update && \
apt upgrade -y && \
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 /openedx/data /openedx/data/media
ARG APP_USER_ID=1000
RUN useradd --home-dir /openedx --create-home --shell /bin/bash --uid ${APP_USER_ID} app
USER ${APP_USER_ID}
RUN git clone https://github.com/edx/xqueue --branch {{ OPENEDX_COMMON_VERSION }} --depth 1 /openedx/xqueue
WORKDIR /openedx/xqueue
RUN python -m venv /openedx/venv
ENV PATH /openedx/venv/bin:${PATH}
RUN pip install --upgrade pip setuptools
RUN pip install -r requirements.txt
RUN pip install uwsgi==2.0.19.1
RUN pip install uwsgi==2.0.20
RUN mkdir /openedx/data /openedx/data/media
EXPOSE 8000
CMD uwsgi \