From 89c65541b0e4ed0051e8a37d58a09f52ee8050bc Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 24 Apr 2026 14:37:32 +0500 Subject: [PATCH] ++ --- apps/django/base/backend-deployment.yaml | 10 ++++++++ apps/django/base/kustomization.yaml | 1 + apps/django/base/uwsgi-configmap.yaml | 30 ++++++++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 apps/django/base/uwsgi-configmap.yaml diff --git a/apps/django/base/backend-deployment.yaml b/apps/django/base/backend-deployment.yaml index ed1437e..95d5a55 100644 --- a/apps/django/base/backend-deployment.yaml +++ b/apps/django/base/backend-deployment.yaml @@ -89,6 +89,13 @@ spec: - key: production.py path: production.py defaultMode: 420 + - name: uwsgi-configmap + configMap: + name: uwsgi-configmap + items: + - key: uwsgi.ini + path: uwsgi.ini + defaultMode: 420 containers: - name: backend image: cr.yandex/crp3ccidau046kdj8g9q/backend:production_a96dead0 @@ -202,5 +209,8 @@ spec: - name: django-configmap mountPath: /opt/sarex/config/settings/production.py subPath: production.py + - name: uwsgi-configmap + mountPath: /opt/sarex/uwsgi.ini + subPath: uwsgi.ini imagePullSecrets: - name: regcred diff --git a/apps/django/base/kustomization.yaml b/apps/django/base/kustomization.yaml index 80faec9..836acab 100644 --- a/apps/django/base/kustomization.yaml +++ b/apps/django/base/kustomization.yaml @@ -14,3 +14,4 @@ resources: - srx-admin-deployment.yaml - srx-admin-service.yaml - nginx-configmap.yaml + - uwsgi-configmap.yaml diff --git a/apps/django/base/uwsgi-configmap.yaml b/apps/django/base/uwsgi-configmap.yaml new file mode 100644 index 0000000..f28fb29 --- /dev/null +++ b/apps/django/base/uwsgi-configmap.yaml @@ -0,0 +1,30 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: uwsgi-configmap + namespace: django +data: + uwsgi.ini: | + [uwsgi] + module = config.wsgi:application + DJANGO_SETTINGS_MODULE = config.settings.production + http = 0.0.0.0:8000 + processes = 16 + master = true + vacuum = true + enable-threads = true + buffer-size = 65535 + stats = :3031 + stats-http = true + memory-report = true + lazy-apps = true + listen = 128 + disable-write-exception= 0 + harakiri = 300 + socket-timeout = 300 + chunked-input-timeout = 300 + http-timeout = 300 + worker-reload-mercy = 240 + mule-reload-mercy = 240 + static-map = /static=/opt/sarex/sarex/static/ + static-map = /media=/media/