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