From fe2090d8e962411260c65496d8a7585d0eb419c9 Mon Sep 17 00:00:00 2001 From: ronny abraham Date: Mon, 17 Jul 2023 10:23:41 +0300 Subject: [PATCH] updated the gunicorn conf files --- share/templates/conf/django/files/gunicorn.jinja2 | 8 ++++++-- .../conf/django/files/gunicorn.unixsocket.jinja2 | 8 ++++++-- share/templates/conf/gunicorn/files/gunicorn.jinja2 | 8 ++++++-- .../conf/gunicorn/files/gunicorn.unixsocket.jinja2 | 8 ++++++-- share/templates/readmes/gunicorn_error.md | 9 +++++++++ 5 files changed, 33 insertions(+), 8 deletions(-) create mode 100644 share/templates/readmes/gunicorn_error.md diff --git a/share/templates/conf/django/files/gunicorn.jinja2 b/share/templates/conf/django/files/gunicorn.jinja2 index a4e5b34..66b7c53 100644 --- a/share/templates/conf/django/files/gunicorn.jinja2 +++ b/share/templates/conf/django/files/gunicorn.jinja2 @@ -6,8 +6,12 @@ raw_env = ["DJANGO_SETTINGS_MODULE={{settings_module}}"] worker_tmp_dir = "/tmp" -user = '{{user}}' -group = '{{group}}' +# +# uncomment only if supervisor does not set these! +# see https://stackoverflow.com/questions/53570850/djangogunicorn-operation-not-permitted + +# user = '{{user}}' +# group = '{{group}}' access_logfile = \ '{{logging_access}}' diff --git a/share/templates/conf/django/files/gunicorn.unixsocket.jinja2 b/share/templates/conf/django/files/gunicorn.unixsocket.jinja2 index de3209d..5fe0f46 100644 --- a/share/templates/conf/django/files/gunicorn.unixsocket.jinja2 +++ b/share/templates/conf/django/files/gunicorn.unixsocket.jinja2 @@ -6,8 +6,12 @@ raw_env = ["DJANGO_SETTINGS_MODULE={{settings_module}}"] worker_tmp_dir = "/tmp" -user = '{{user}}' -group = '{{group}}' +# +# uncomment only if supervisor does not already set these! +# see https://stackoverflow.com/questions/53570850/djangogunicorn-operation-not-permitted + +# user = '{{user}}' +# group = '{{group}}' access_logfile = \ '{{logging_access}}' diff --git a/share/templates/conf/gunicorn/files/gunicorn.jinja2 b/share/templates/conf/gunicorn/files/gunicorn.jinja2 index a4e5b34..66b7c53 100644 --- a/share/templates/conf/gunicorn/files/gunicorn.jinja2 +++ b/share/templates/conf/gunicorn/files/gunicorn.jinja2 @@ -6,8 +6,12 @@ raw_env = ["DJANGO_SETTINGS_MODULE={{settings_module}}"] worker_tmp_dir = "/tmp" -user = '{{user}}' -group = '{{group}}' +# +# uncomment only if supervisor does not set these! +# see https://stackoverflow.com/questions/53570850/djangogunicorn-operation-not-permitted + +# user = '{{user}}' +# group = '{{group}}' access_logfile = \ '{{logging_access}}' diff --git a/share/templates/conf/gunicorn/files/gunicorn.unixsocket.jinja2 b/share/templates/conf/gunicorn/files/gunicorn.unixsocket.jinja2 index de3209d..5fe0f46 100644 --- a/share/templates/conf/gunicorn/files/gunicorn.unixsocket.jinja2 +++ b/share/templates/conf/gunicorn/files/gunicorn.unixsocket.jinja2 @@ -6,8 +6,12 @@ raw_env = ["DJANGO_SETTINGS_MODULE={{settings_module}}"] worker_tmp_dir = "/tmp" -user = '{{user}}' -group = '{{group}}' +# +# uncomment only if supervisor does not already set these! +# see https://stackoverflow.com/questions/53570850/djangogunicorn-operation-not-permitted + +# user = '{{user}}' +# group = '{{group}}' access_logfile = \ '{{logging_access}}' diff --git a/share/templates/readmes/gunicorn_error.md b/share/templates/readmes/gunicorn_error.md new file mode 100644 index 0000000..70bd197 --- /dev/null +++ b/share/templates/readmes/gunicorn_error.md @@ -0,0 +1,9 @@ + +## important gunicorn error + +https://stackoverflow.com/questions/53570850/djangogunicorn-operation-not-permitted; + +the problem is that if supervisor sets both user and group, and then gunicvorn does it, you can +get a blow up. + +so comment it out in one conf or the other