adjust ansible scripts to use gunicorn.conf.py

This commit is contained in:
jonaswinkler 2021-01-31 15:36:52 +01:00
parent fd59def1bd
commit 3180b38797
2 changed files with 8 additions and 1 deletions

View File

@ -54,6 +54,7 @@
- src: Pipfile.lock
- src: README.md
- src: requirements.txt
- src: gunicorn.conf.py
- src: paperless.conf.example
dest: "paperless.conf"

View File

@ -456,6 +456,12 @@
line: '\1<policy domain="coder" rights="read|write" pattern="PDF" />'
backrefs: yes
- name: configure gunicorn web server
lineinfile:
path: "{{ paperlessng_directory }}/gunicorn.conf.py"
regexp: '^bind = '
line: "bind = '{{ paperlessng_listen_address }}:{{ paperlessng_listen_port }}'"
- name: configure systemd services
ini_file:
path: "{{ paperlessng_directory }}/scripts/{{ item[0] }}"
@ -498,7 +504,7 @@
path: "{{ paperlessng_directory }}/scripts/paperless-webserver.service"
section: "Service"
option: "ExecStart"
value: "{{ paperlessng_virtualenv }}/bin/gunicorn paperless.asgi:application -w 2 -k uvicorn.workers.UvicornWorker -b {{ paperlessng_listen_address }}:{{ paperlessng_listen_port }}"
value: "{{ paperlessng_virtualenv }}/bin/gunicorn -c {{ paperlessng_directory }}/gunicorn.conf.py paperless.asgi:application"
- name: copy systemd services
copy: