mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-12-12 14:17:46 +00:00
Added config values for #gunicorn workers
This commit is contained in:
parent
a2f072faa9
commit
8659b6e7ac
@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
Note: Breaking changes between versions are indicated by "💥".
|
Note: Breaking changes between versions are indicated by "💥".
|
||||||
|
|
||||||
|
## Unreleased
|
||||||
|
|
||||||
|
- [Improvement] Added configuration values to limit the number of gunicorn workers for the LMS and CMS.
|
||||||
|
|
||||||
## 3.7.0 (2019-09-03)
|
## 3.7.0 (2019-09-03)
|
||||||
|
|
||||||
- 💥[Improvement] Get rid of mysql-client container
|
- 💥[Improvement] Get rid of mysql-client container
|
||||||
|
@ -76,6 +76,14 @@ You may want to pull/push images from/to a custom docker registry. For instance,
|
|||||||
|
|
||||||
(the trailing ``/`` is important)
|
(the trailing ``/`` is important)
|
||||||
|
|
||||||
|
Open edX customisation
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
- ``OPENEDX_CMS_GUNICORN_WORKERS`` (default: ``2``)
|
||||||
|
- ``OPENEDX_LMS_GUNICORN_WORKERS`` (default: ``2``)
|
||||||
|
|
||||||
|
By default there are 2 `gunicorn worker processes <https://docs.gunicorn.org/en/stable/settings.html#worker-processes>`__ to serve requests for the LMS and the CMS. However, each workers requires upwards of 500 Mb of RAM. You should reduce this value to 1 if your computer/server does not have enough memory.
|
||||||
|
|
||||||
Vendor services
|
Vendor services
|
||||||
~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
@ -38,9 +38,7 @@ RUN cd /tmp \
|
|||||||
&& mv openedx-i18n-hawthorn/edx-platform/locale/ /openedx/locale/ \
|
&& mv openedx-i18n-hawthorn/edx-platform/locale/ /openedx/locale/ \
|
||||||
&& rm -rf openedx-i18n*
|
&& rm -rf openedx-i18n*
|
||||||
|
|
||||||
# Install python requirements (clone source repos in a separate dir, otherwise
|
# Install python requirements in a virtualenv
|
||||||
# they will be overwritten when we mount edx-platform)
|
|
||||||
ENV NO_PYTHON_UNINSTALL 1
|
|
||||||
RUN virtualenv /openedx/venv
|
RUN virtualenv /openedx/venv
|
||||||
ENV PATH /openedx/venv/bin:${PATH}
|
ENV PATH /openedx/venv/bin:${PATH}
|
||||||
ENV VIRTUAL_ENV /openedx/venv/
|
ENV VIRTUAL_ENV /openedx/venv/
|
||||||
@ -65,7 +63,9 @@ ENV PATH ./node_modules/.bin:${PATH}
|
|||||||
|
|
||||||
# Install private requirements: this is useful for installing custom xblocks.
|
# Install private requirements: this is useful for installing custom xblocks.
|
||||||
COPY ./requirements/ /openedx/requirements
|
COPY ./requirements/ /openedx/requirements
|
||||||
RUN cd /openedx/requirements/ && pip install -r ./private.txt
|
RUN cd /openedx/requirements/ \
|
||||||
|
&& touch ./private.txt \
|
||||||
|
&& pip install -r ./private.txt
|
||||||
|
|
||||||
# Create folder that will store *.env.json and *.auth.json files, as well as
|
# Create folder that will store *.env.json and *.auth.json files, as well as
|
||||||
# the tutor-specific settings files.
|
# the tutor-specific settings files.
|
||||||
@ -88,6 +88,7 @@ ENV PATH /openedx/bin:${PATH}
|
|||||||
# and requires a complex settings file. Instead, we decompose the commands
|
# and requires a complex settings file. Instead, we decompose the commands
|
||||||
# and run each one individually to collect the production static assets to
|
# and run each one individually to collect the production static assets to
|
||||||
# /openedx/staticfiles.
|
# /openedx/staticfiles.
|
||||||
|
ENV NO_PYTHON_UNINSTALL 1
|
||||||
RUN openedx-assets xmodule \
|
RUN openedx-assets xmodule \
|
||||||
&& openedx-assets npm \
|
&& openedx-assets npm \
|
||||||
&& openedx-assets webpack --env=prod \
|
&& openedx-assets webpack --env=prod \
|
||||||
|
@ -54,6 +54,8 @@ MONGODB_DATABASE: "openedx"
|
|||||||
MONGODB_PORT: 27017
|
MONGODB_PORT: 27017
|
||||||
MONGODB_USERNAME: ""
|
MONGODB_USERNAME: ""
|
||||||
MONGODB_PASSWORD: ""
|
MONGODB_PASSWORD: ""
|
||||||
|
OPENEDX_CMS_GUNICORN_WORKERS: 2
|
||||||
|
OPENEDX_LMS_GUNICORN_WORKERS: 2
|
||||||
OPENEDX_MYSQL_DATABASE: "openedx"
|
OPENEDX_MYSQL_DATABASE: "openedx"
|
||||||
OPENEDX_MYSQL_USERNAME: "openedx"
|
OPENEDX_MYSQL_USERNAME: "openedx"
|
||||||
MYSQL_HOST: "mysql"
|
MYSQL_HOST: "mysql"
|
||||||
|
@ -110,6 +110,7 @@ services:
|
|||||||
image: {{ DOCKER_REGISTRY }}{{ DOCKER_IMAGE_OPENEDX }}
|
image: {{ DOCKER_REGISTRY }}{{ DOCKER_IMAGE_OPENEDX }}
|
||||||
environment:
|
environment:
|
||||||
SERVICE_VARIANT: lms
|
SERVICE_VARIANT: lms
|
||||||
|
GUNICORN_WORKERS: {{ OPENEDX_LMS_GUNICORN_WORKERS }}
|
||||||
SETTINGS: ${EDX_PLATFORM_SETTINGS:-tutor.production}
|
SETTINGS: ${EDX_PLATFORM_SETTINGS:-tutor.production}
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
@ -134,6 +135,7 @@ services:
|
|||||||
image: {{ DOCKER_REGISTRY }}{{ DOCKER_IMAGE_OPENEDX }}
|
image: {{ DOCKER_REGISTRY }}{{ DOCKER_IMAGE_OPENEDX }}
|
||||||
environment:
|
environment:
|
||||||
SERVICE_VARIANT: cms
|
SERVICE_VARIANT: cms
|
||||||
|
GUNICORN_WORKERS: {{ OPENEDX_CMS_GUNICORN_WORKERS }}
|
||||||
SETTINGS: ${EDX_PLATFORM_SETTINGS:-tutor.production}
|
SETTINGS: ${EDX_PLATFORM_SETTINGS:-tutor.production}
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
|
Loading…
Reference in New Issue
Block a user