Update to 2020-10-26 12:00

master
Daniel Berteaud 4 years ago
parent 4f84e18f51
commit b7b245b0f8
  1. 1
      roles/papermerge/tasks/conf.yml
  2. 1
      roles/papermerge/tasks/directories.yml
  3. 11
      roles/papermerge/tasks/install.yml
  4. 2
      roles/papermerge/tasks/iptables.yml
  5. 2
      roles/papermerge/templates/gunicorn.conf.py.j2
  6. 5
      roles/papermerge/templates/papermerge.conf.py.j2
  7. 2
      roles/papermerge/templates/production.py.j2
  8. 4
      roles/pve/vars/main.yml

@ -14,6 +14,7 @@
dest: "{{ papermerge_root_dir }}/app/config/settings/production.py"
group: "{{ papermerge_user }}"
mode: 0640
notify: restart papermerge
tags: ged
- name: Iniialize or update the database

@ -4,6 +4,7 @@
file: path={{ item.dir }} state=directory owner={{ item.owner | default(omit) }} group={{ item.group | default(omit) }} mode={{ item.mode | default(omit) }}
loop:
- dir: "{{ papermerge_root_dir }}"
owner: "{{ papermerge_user }}"
group: nginx
mode: 750
- dir: "{{ papermerge_root_dir }}/app"

@ -6,6 +6,8 @@
- rh-python38-python-pip
- rh-python38-python-setuptools
- rh-python38-python-devel
- python-setuptools
- python-psycopg2
- postgresql-devel
- tesseract
- tesseract-langpack-fra
@ -54,8 +56,7 @@
pip:
requirements: "{{ papermerge_root_dir }}/app/requirements/base.txt"
virtualenv: "{{ papermerge_root_dir }}/venv"
virtualenv_command: /opt/rh/rh-python38/root/usr/local/bin/virtualenv
virtualenv_python: /opt/rh/rh-python38/root/bin/python
virtualenv_command: /opt/rh/rh-python38/root/bin/python -m venv
notify: restart papermerge
- name: Install additional python modules
@ -64,8 +65,7 @@
- psycopg2-binary # building fails here, Python.h not found (??)
- gunicorn
virtualenv: "{{ papermerge_root_dir }}/venv"
virtualenv_command: /opt/rh/rh-python38/root/usr/local/bin/virtualenv
virtualenv_python: /opt/rh/rh-python38/root/bin/python
virtualenv_command: /opt/rh/rh-python38/root/usr/bin/python -m venv
notify: restart papermerge
tags: ged
@ -114,3 +114,6 @@
mode: 755
tags: ged
- name: Set permission on the queue dir
file: path={{ papermerge_root_dir }}/tmp/queue state=directory owner={{ papermerge_user }} group={{ papermerge_user }}
tags: ged

@ -4,6 +4,6 @@
iptables_raw:
name: papermerge_port
state: "{{ (papermerge_src_ip | length > 0) | ternary('present','absent') }}"
rules: "-A INPUT -m state --state NEW -p tcp --dport {{ papermerge_port }} -s {{ papermerge_src_ip | join(',') }} -j ACCEPT"
rules: "-A INPUT -m state --state NEW -p tcp -m multiport --dports {{ papermerge_port }},{{ papermerge_port | int + 1 }} -s {{ papermerge_src_ip | join(',') }} -j ACCEPT"
tags: firewall,ged

@ -1,2 +1,2 @@
workers = 2
bind = ["127.0.0.1:{{ papermerge_port | int + 1 }}"]
bind = ["0.0.0.0:{{ papermerge_port | int + 1 }}"]

@ -9,6 +9,11 @@ IMPORTER_DIR = "{{ papermerge_root_dir }}/input"
FILES_MIN_UNMODIFIED_DURATION = 10
OCR_DEFAULT_LANGUAGE = "{{ papermerge_ocr_default_lang }}"
LANGUAGE_FROM_AGENT = True
LANGUAGES = [
('de', 'Deutsch'),
('en', 'English'),
('fr', 'Français'),
]
TASK_QUEUE_DIR = "{{ papermerge_root_dir }}/tmp/queue"
OCR_LANGUAGES = {
"deu": "Deutsch",

@ -1,5 +1,5 @@
from .base import * # noqa
DEBUG = False
ALLOWED_HOSTS = ['127.0.0.1']
ALLOWED_HOSTS = ['*']
SECRET_KEY = "{{ papermerge_secret_key }}"

@ -4,3 +4,7 @@ iptables_manage: False
# We most likely want to enable ip_forwarding
net_ipv4_forward: True
# root must be able to connect with ssh, and without DNS
sshd_permit_root_login: True
sshd_use_dns: False

Loading…
Cancel
Save