mirror of
				https://git.lapiole.org/dani/ansible-roles.git
				synced 2025-10-31 10:51:27 +01:00 
			
		
		
		
	Update to 2021-12-01 19:13
This commit is contained in:
		| @@ -0,0 +1,2 @@ | ||||
| workers = 2 | ||||
| bind = ["0.0.0.0:{{ papermerge_port | int + 1 }}"] | ||||
							
								
								
									
										18
									
								
								roles/unmaintained/papermerge/templates/nginx.conf.j2
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								roles/unmaintained/papermerge/templates/nginx.conf.j2
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | ||||
| server { | ||||
|   server_name papermerge; | ||||
|   listen {{ papermerge_port }}; | ||||
|  | ||||
|   location /static/ { | ||||
|     alias {{ papermerge_root_dir }}/app/static/; | ||||
|   } | ||||
|  | ||||
|   location /media/ { | ||||
|     alias {{ papermerge_root_dir }}/app/media/; | ||||
|   } | ||||
|  | ||||
|   location / { | ||||
|     proxy_pass http://127.0.0.1:{{ papermerge_port | int + 1}}; | ||||
|     # Don't restrict size here. You will probably put another front proxy anyway | ||||
|     client_max_body_size 200m; | ||||
|   } | ||||
| } | ||||
| @@ -0,0 +1,23 @@ | ||||
| [Unit] | ||||
| Description=Paperemerge web service | ||||
| After=postgresql.service | ||||
| Requires=papermerge-worker.service | ||||
|  | ||||
| [Service] | ||||
| WorkingDirectory={{ papermerge_root_dir }}/app | ||||
| Environment=DJANGO_SETTINGS_MODULE=config.settings.production | ||||
| ExecStart={{ papermerge_root_dir }}/venv/bin/gunicorn config.wsgi:application --config {{ papermerge_root_dir }}/app/gunicorn.conf.py | ||||
| User={{ papermerge_user }} | ||||
| Group={{ papermerge_user }} | ||||
| PrivateTmp=yes | ||||
| PrivateDevices=yes | ||||
| ProtectSystem=full | ||||
| ProtectHome=yes | ||||
| NoNewPrivileges=yes | ||||
| MemoryLimit=1024M | ||||
| Restart=on-failure | ||||
| StartLimitInterval=0 | ||||
| RestartSec=30 | ||||
|  | ||||
| [Install] | ||||
| WantedBy=multi-user.target | ||||
| @@ -0,0 +1,24 @@ | ||||
| [Unit] | ||||
| Description=Papermerge Worker | ||||
| After=network.target | ||||
|  | ||||
| [Service] | ||||
| Type=simple | ||||
| WorkingDirectory={{ papermerge_root_dir }}/app | ||||
| Environment=DJANGO_SETTINGS_MODULE=config.settings.production | ||||
| Environment=OMP_THREAD_LIMIT={{ ansible_processor_vcpus }} | ||||
| ExecStart={{ papermerge_root_dir }}/venv/bin/python manage.py worker | ||||
| User={{ papermerge_user }} | ||||
| Group={{ papermerge_user }} | ||||
| PrivateTmp=yes | ||||
| PrivateDevices=yes | ||||
| ProtectSystem=full | ||||
| ProtectHome=yes | ||||
| NoNewPrivileges=yes | ||||
| MemoryLimit=1024M | ||||
| Restart=on-failure | ||||
| StartLimitInterval=0 | ||||
| RestartSec=30 | ||||
|  | ||||
| [Install] | ||||
| WantedBy=multi-user.target | ||||
| @@ -0,0 +1,41 @@ | ||||
| DBTYPE = "postgres" | ||||
| DBNAME = "{{ papermerge_db_name }}" | ||||
| DBUSER = "{{ papermerge_db_user }}" | ||||
| DBPASS = "{{ papermerge_db_pass }}" | ||||
| DBHOST = "{{ papermerge_db_server }}" | ||||
| DBPORT = "{{ papermerge_db_port }}" | ||||
| MEDIA_DIR = "{{ papermerge_root_dir }}/data" | ||||
| IMPORTER_DIR = "{{ papermerge_import_dir }}" | ||||
| 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", | ||||
|   "eng": "English", | ||||
|   "fra": "Français", | ||||
|   "spa": "Spanish", | ||||
|   "ita": "Italian" | ||||
| } | ||||
|  | ||||
| METADATA_DATE_FORMATS = [ | ||||
|     'yyyy-mm-dd', | ||||
|     'month' | ||||
| ] | ||||
| CELERY_BROKER_URL = "redis://" | ||||
| CELERY_BROKER_TRANSPORT_OPTIONS = {} | ||||
| CELERY_RESULT_BACKEND = "redis://localhost/0" | ||||
|  | ||||
| {% if papermerge_imap_host is defined and papermerge_imap_user is defined and papermerge_imap_pass is defined %} | ||||
| IMPORT_MAIL_HOST = "{{ papermerge_imap_host }}" | ||||
| IMPORT_MAIL_USER = "{{ papermerge_imap_user }}" | ||||
| IMPORT_MAIL_PASS = "{{ papermerge_imap_pass }}" | ||||
| IMPORT_MAIL_BY_USER = True | ||||
| IMPORT_MAIL_BY_SECRET = True | ||||
| {% endif %} | ||||
|  | ||||
| BINARY_STAPLER= "/opt/papermerge/venv/bin/stapler" | ||||
							
								
								
									
										5
									
								
								roles/unmaintained/papermerge/templates/production.py.j2
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								roles/unmaintained/papermerge/templates/production.py.j2
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | ||||
| from .base import *  # noqa | ||||
| DEBUG = False | ||||
| ALLOWED_HOSTS = ['*'] | ||||
| SECRET_KEY = "{{ papermerge_secret_key }}" | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Daniel Berteaud
					Daniel Berteaud