6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-12-12 14:17:46 +00:00

Merge remote-tracking branch 'origin/master' into nightly

This commit is contained in:
Overhang.IO 2023-03-15 11:09:18 +00:00
commit ddd6987852
8 changed files with 69 additions and 10 deletions

View File

@ -0,0 +1,12 @@
<!--
Create a changelog entry for every new user-facing change. Please respect the following instructions:
- Indicate breaking changes by prepending an explosion 💥 character.
- Prefix your changes with either [Bugfix], [Improvement], [Feature], [Security], [Deprecation].
- You may optionally append "(by @<author>)" at the end of the line, where "<author>" is either one (just one)
of your GitHub username, real name or affiliated organization. These affiliations will be displayed in
the release notes for every release.
-->
<!-- - 💥[Feature] Foobarize the blorginator. This breaks plugins by renaming the `FOO_DO` filter to `BAR_DO`. (by @regisb) -->
<!-- - [Improvement] This is a non-breaking change. Life is good. (by @billgates) -->
- [Improvement] Make it possible to extend or override the configuration of the uWSGI server. (by @MoisesGSalas)

View File

@ -356,3 +356,14 @@ Python-formatted LMS settings in development. Values defined here override the v
File: ``apps/openedx/settings/lms/production.py``
Python-formatted LMS settings in production. Values defined here override the values from :patch:`openedx-lms-common-settings`.
``uwsgi-config``
================
File: ``apps/openedx/settings/uwsgi.ini``
A .INI formatted file used to extend or override the uWSGI configuration.
Check the uWSGI documentation for more details about the `.INI format <https://uwsgi-docs.readthedocs.io/en/latest/Configuration.html#ini-files>`__ and the `list of available options <https://uwsgi-docs.readthedocs.io/en/latest/Options.html>`__.
.. patch:: uwsgi-config

View File

@ -0,0 +1,3 @@
{% include "build/openedx/settings/uwsgi.ini" %}
{{ patch("uwsgi-config") }}

View File

@ -244,17 +244,14 @@ CMD ./manage.py $SERVICE_VARIANT runserver 0.0.0.0:8000
###### Final image with production cmd
FROM production as final
# Default amount of uWSGI processes
ENV UWSGI_WORKERS=2
# Copy the default uWSGI configuration
COPY --chown=app:app settings/uwsgi.ini .
# Run server
CMD uwsgi \
--static-map /static=/openedx/staticfiles/ \
--static-map /media=/openedx/media/ \
--http 0.0.0.0:8000 \
--thunder-lock \
--single-interpreter \
--enable-threads \
--processes=${UWSGI_WORKERS:-2} \
--buffer-size=8192 \
--wsgi-file $SERVICE_VARIANT/wsgi.py
CMD uwsgi uwsgi.ini
{{ patch("openedx-dockerfile-final") }}

View File

@ -0,0 +1,10 @@
[uwsgi]
static-map = /static=/openedx/staticfiles/
static-map = /media=/openedx/media/
http = 0.0.0.0:8000
buffer-size = 8192
wsgi-file = $(SERVICE_VARIANT)/wsgi.py
processes = $(UWSGI_WORKERS)
thunder-lock = true
single-interpreter = true
enable-threads = true

View File

@ -96,6 +96,9 @@ spec:
name: settings-cms
- mountPath: /openedx/config
name: config
- mountPath: /openedx/edx-platform/uwsgi.ini
name: uwsgi-config
subPath: uwsgi.ini
resources:
requests:
memory: 2Gi
@ -111,6 +114,12 @@ spec:
- name: config
configMap:
name: openedx-config
- name: uwsgi-config
configMap:
name: openedx-uwsgi-config
items:
- key: uwsgi.ini
path: uwsgi.ini
---
apiVersion: apps/v1
kind: Deployment
@ -198,6 +207,9 @@ spec:
name: settings-cms
- mountPath: /openedx/config
name: config
- mountPath: /openedx/edx-platform/uwsgi.ini
name: uwsgi-config
subPath: uwsgi.ini
resources:
requests:
memory: 2Gi
@ -213,6 +225,12 @@ spec:
- name: config
configMap:
name: openedx-config
- name: uwsgi-config
configMap:
name: openedx-uwsgi-config
items:
- key: uwsgi.ini
path: uwsgi.ini
---
apiVersion: apps/v1
kind: Deployment

View File

@ -51,6 +51,12 @@ configMapGenerator:
options:
labels:
app.kubernetes.io/name: openedx
- name: openedx-uwsgi-config
files:
- apps/openedx/uwsgi.ini
options:
labels:
app.kubernetes.io/name: openedx
- name: redis-config
files:
- apps/redis/redis.conf

View File

@ -111,6 +111,7 @@ services:
- ../apps/openedx/settings/lms:/openedx/edx-platform/lms/envs/tutor:ro
- ../apps/openedx/settings/cms:/openedx/edx-platform/cms/envs/tutor:ro
- ../apps/openedx/config:/openedx/config:ro
- ../apps/openedx/uwsgi.ini:/openedx/edx-platform/uwsgi.ini:ro
- ../../data/lms:/openedx/data
- ../../data/openedx-media:/openedx/media
depends_on:
@ -142,6 +143,7 @@ services:
- ../apps/openedx/settings/lms:/openedx/edx-platform/lms/envs/tutor:ro
- ../apps/openedx/settings/cms:/openedx/edx-platform/cms/envs/tutor:ro
- ../apps/openedx/config:/openedx/config:ro
- ../apps/openedx/uwsgi.ini:/openedx/edx-platform/uwsgi.ini:ro
- ../../data/cms:/openedx/data
- ../../data/openedx-media:/openedx/media
depends_on: