From 20ed99b29a5b11689442324c21e9091c08dc1698 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Mon, 13 Jun 2022 21:52:46 +0200 Subject: [PATCH] fix uwsgi config, fix settings --- app/settings.py | 3 ++- app/wsgi.ini | 8 ++++---- app/wsgi.sh | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/settings.py b/app/settings.py index 4c55374b..852b3059 100644 --- a/app/settings.py +++ b/app/settings.py @@ -35,6 +35,7 @@ ALLOWED_HOSTS = [ 'localhost', 'el.pro-barreau.dockdev.pilotsystems.net', 'e-learning.pro-barreau.com', + 'staging.el.pro-barreau.parisson.com' ] DATABASES = { @@ -105,7 +106,7 @@ MEDIA_ROOT = '/srv/media/' # trailing slash if there is a path component (optional in other cases). # Examples: "http://media.lawrence.com", "http://example.com/media/" #MEDIA_URL = 'http://pre-barreau.com/archives/' -MEDIA_URL = '/media/' +MEDIA_URL = 'https://e-learning.pro-barreau.com/media/' # Absolute path to the directory static files should be collected to. # Don't put anything in this directory yourself; store your static files diff --git a/app/wsgi.ini b/app/wsgi.ini index 1f18bf1d..8f56c13d 100644 --- a/app/wsgi.ini +++ b/app/wsgi.ini @@ -30,11 +30,11 @@ reload-on-rss = 4096 ; Restart workers after this much resident worker-reload-mercy = 300 ; How long to wait before forcefully killing workers cheaper-algo = busyness -processes = 64 ; Maximum number of workers allowed -cheaper = 24 ; Minimum number of workers allowed -cheaper-initial = 24 ; Workers created at startup +processes = 4 ; Maximum number of workers allowed +cheaper = 2 ; Minimum number of workers allowed +cheaper-initial = 2 ; Workers created at startup cheaper-overload = 1 ; Length of a cycle in seconds -cheaper-step = 8 ; How many workers to spawn at a time +cheaper-step = 1 ; How many workers to spawn at a time cheaper-busyness-multiplier = 30 ; How many cycles to wait before killing workers cheaper-busyness-min = 20 ; Below this threshold, kill workers (if stable for multiplier cycles) diff --git a/app/wsgi.sh b/app/wsgi.sh index ca4238f8..417e0e7b 100755 --- a/app/wsgi.sh +++ b/app/wsgi.sh @@ -41,7 +41,7 @@ else # watchmedo shell-command --patterns="$patterns" --recursive \ # --command='python '$manage' collectstatic --noinput' $app & - python $manage collectstatic --noinput + #python $manage collectstatic --noinput chown -R www-data: $debug_log -- 2.39.5