mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-12-13 06:37: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 "💥".
|
||||
|
||||
## Unreleased
|
||||
|
||||
- [Improvement] Added configuration values to limit the number of gunicorn workers for the LMS and CMS.
|
||||
|
||||
## 3.7.0 (2019-09-03)
|
||||
|
||||
- 💥[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)
|
||||
|
||||
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
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
|
@ -38,9 +38,7 @@ RUN cd /tmp \
|
||||
&& mv openedx-i18n-hawthorn/edx-platform/locale/ /openedx/locale/ \
|
||||
&& rm -rf openedx-i18n*
|
||||
|
||||
# Install python requirements (clone source repos in a separate dir, otherwise
|
||||
# they will be overwritten when we mount edx-platform)
|
||||
ENV NO_PYTHON_UNINSTALL 1
|
||||
# Install python requirements in a virtualenv
|
||||
RUN virtualenv /openedx/venv
|
||||
ENV PATH /openedx/venv/bin:${PATH}
|
||||
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.
|
||||
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
|
||||
# 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 run each one individually to collect the production static assets to
|
||||
# /openedx/staticfiles.
|
||||
ENV NO_PYTHON_UNINSTALL 1
|
||||
RUN openedx-assets xmodule \
|
||||
&& openedx-assets npm \
|
||||
&& openedx-assets webpack --env=prod \
|
||||
|
@ -54,6 +54,8 @@ MONGODB_DATABASE: "openedx"
|
||||
MONGODB_PORT: 27017
|
||||
MONGODB_USERNAME: ""
|
||||
MONGODB_PASSWORD: ""
|
||||
OPENEDX_CMS_GUNICORN_WORKERS: 2
|
||||
OPENEDX_LMS_GUNICORN_WORKERS: 2
|
||||
OPENEDX_MYSQL_DATABASE: "openedx"
|
||||
OPENEDX_MYSQL_USERNAME: "openedx"
|
||||
MYSQL_HOST: "mysql"
|
||||
|
@ -110,6 +110,7 @@ services:
|
||||
image: {{ DOCKER_REGISTRY }}{{ DOCKER_IMAGE_OPENEDX }}
|
||||
environment:
|
||||
SERVICE_VARIANT: lms
|
||||
GUNICORN_WORKERS: {{ OPENEDX_LMS_GUNICORN_WORKERS }}
|
||||
SETTINGS: ${EDX_PLATFORM_SETTINGS:-tutor.production}
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
@ -134,6 +135,7 @@ services:
|
||||
image: {{ DOCKER_REGISTRY }}{{ DOCKER_IMAGE_OPENEDX }}
|
||||
environment:
|
||||
SERVICE_VARIANT: cms
|
||||
GUNICORN_WORKERS: {{ OPENEDX_CMS_GUNICORN_WORKERS }}
|
||||
SETTINGS: ${EDX_PLATFORM_SETTINGS:-tutor.production}
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
|
Loading…
Reference in New Issue
Block a user