mirror of
https://github.com/fscotto/infra.git
synced 2026-11-26 05:39:52 +00:00
Add rootless Paperless-ngx service to Atlas
This commit is contained in:
@@ -97,6 +97,17 @@ atlas_nextcloud_apps:
|
||||
url: https://github.com/nextcloud-releases/calendar/releases/download/v6.6.2/calendar-v6.6.2.tar.gz
|
||||
checksum: sha256:7e83632d4436d3037a34d1c73cbc06d5ccb6e8fc10f096a86a43a0515588529c
|
||||
# Rootless Gitea was restored from the stopped-source export before production activation.
|
||||
# Paperless runs rootless on dedicated ZFS datasets; NPM remains on Prometheus.
|
||||
atlas_manage_paperless: true
|
||||
atlas_paperless_domain: documents.fscotto.co
|
||||
# Resolved official amd64 images on 2026-10-12; upgrades remain deliberate.
|
||||
atlas_paperless_image: ghcr.io/paperless-ngx/paperless-ngx:3.2.1@sha256:5fa76604a81df6945086e0837b14b56543d137e8ce4f311cc5d9ebe907e74e79
|
||||
atlas_paperless_postgres_image: docker.io/library/postgres:17-bookworm@sha256:3645570cccdfa447589da9f57dd740faa29b30938e861289a5574b6ca6b03826
|
||||
atlas_paperless_valkey_image: docker.io/valkey/valkey:8-bookworm@sha256:fea8b3e67b15729d4bb70589eb03367bab9ad1ee89c876f54327fc7c6e618571
|
||||
atlas_paperless_tika_image: docker.io/apache/tika:3.3.1.0@sha256:90b7fa1dc018434075fce9e1d9b88b1e3d0ea6979d0cf86e116c79a8073ae973
|
||||
atlas_paperless_gotenberg_image: docker.io/gotenberg/gotenberg:8.37@sha256:f29984bd1e226bf1b93ba90af06000afa8b315853e99d27b9aaa41b93f15c769
|
||||
atlas_paperless_ollama_image: docker.io/ollama/ollama:0.40.3@sha256:adca95a12c2b386a8f9a995e7fa0600e187e3323b5e5522f5a6c3b1ec73eff99
|
||||
|
||||
atlas_manage_gitea: true
|
||||
atlas_gitea_production_enabled: true
|
||||
atlas_gitea_public_domain: git.fscotto.co
|
||||
|
||||
@@ -325,3 +325,30 @@ atlas_aria2_rpc_port: 6800
|
||||
atlas_ariang_web_port: 8091
|
||||
atlas_aria2_image: CHANGEME_PINNED_ARIA2_IMAGE
|
||||
atlas_ariang_image: CHANGEME_PINNED_ARIANG_IMAGE
|
||||
|
||||
# Rootless Paperless-ngx document management. Secrets live only in the encrypted Vault.
|
||||
atlas_manage_paperless: false
|
||||
atlas_paperless_dataset: "{{ atlas_zfs_pool }}/services/data/paperless"
|
||||
atlas_paperless_root: "{{ atlas_app_data_mountpoint }}/paperless"
|
||||
atlas_paperless_private_dir: "{{ atlas_admin_home }}/.config/atlas-paperless"
|
||||
atlas_paperless_quadlet_dir: "{{ atlas_admin_home }}/.config/containers/systemd"
|
||||
atlas_paperless_domain: ""
|
||||
atlas_paperless_http_port: 8002
|
||||
atlas_paperless_network_subnet: 10.90.11.0/24
|
||||
atlas_paperless_network_gateway: 10.90.11.1
|
||||
atlas_paperless_ocr_language: ita+eng
|
||||
atlas_paperless_image: ""
|
||||
atlas_paperless_postgres_image: ""
|
||||
atlas_paperless_valkey_image: ""
|
||||
atlas_paperless_tika_image: ""
|
||||
atlas_paperless_gotenberg_image: ""
|
||||
atlas_paperless_ollama_image: ""
|
||||
atlas_paperless_llm_model: qwen2.5:1.5b-instruct-q4_K_M
|
||||
atlas_paperless_embedding_model: nomic-embed-text:v1.5
|
||||
atlas_paperless_services:
|
||||
- atlas-paperless-db.service
|
||||
- atlas-paperless-valkey.service
|
||||
- atlas-paperless-tika.service
|
||||
- atlas-paperless-gotenberg.service
|
||||
- atlas-paperless-ollama.service
|
||||
- atlas-paperless.service
|
||||
|
||||
@@ -26,6 +26,9 @@
|
||||
- name: Import Atlas iCloudPD storage and boot-started Quadlet tasks
|
||||
ansible.builtin.import_tasks: icloudpd.yml
|
||||
|
||||
- name: Import Atlas Paperless-ngx document-management service
|
||||
ansible.builtin.import_tasks: paperless.yml
|
||||
|
||||
- name: Import Atlas torrent service
|
||||
ansible.builtin.import_tasks: qbittorrent.yml
|
||||
|
||||
|
||||
255
ansible/roles/profile_atlas/tasks/paperless.yml
Normal file
255
ansible/roles/profile_atlas/tasks/paperless.yml
Normal file
@@ -0,0 +1,255 @@
|
||||
---
|
||||
- name: Manage Atlas rootless Paperless-ngx
|
||||
tags: [atlas, paperless]
|
||||
when: atlas_manage_paperless | bool
|
||||
block:
|
||||
- name: Require isolated Paperless state, public domain and pinned images
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- atlas_manage_storage | bool
|
||||
- atlas_manage_firewall | bool
|
||||
- atlas_paperless_root == atlas_app_data_mountpoint ~ '/paperless'
|
||||
- atlas_paperless_dataset == atlas_zfs_pool ~ '/services/data/paperless'
|
||||
- atlas_paperless_domain is match('^[a-z0-9]+([.-][a-z0-9]+)+$')
|
||||
- atlas_paperless_http_port | int > 1024
|
||||
- atlas_paperless_http_port | int < 65536
|
||||
- atlas_paperless_network_subnet != atlas_nextcloud_network_subnet
|
||||
- item is search('@sha256:[0-9a-f]{64}$')
|
||||
loop:
|
||||
- "{{ atlas_paperless_image }}"
|
||||
- "{{ atlas_paperless_postgres_image }}"
|
||||
- "{{ atlas_paperless_valkey_image }}"
|
||||
- "{{ atlas_paperless_tika_image }}"
|
||||
- "{{ atlas_paperless_gotenberg_image }}"
|
||||
- "{{ atlas_paperless_ollama_image }}"
|
||||
|
||||
- name: Require dedicated Paperless Vault secrets without exposing them
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- vault_paperless_database_password | default('') is match('^[a-zA-Z0-9]{32,}$')
|
||||
- vault_paperless_secret_key | default('') | length >= 64
|
||||
no_log: true
|
||||
|
||||
- name: Verify the existing application-data parent is mounted
|
||||
community.general.zfs_facts:
|
||||
name: "{{ atlas_zfs_pool }}/{{ atlas_zfs_dataset_app_data }}"
|
||||
properties: name,mounted,mountpoint
|
||||
register: atlas_paperless_parent
|
||||
|
||||
- name: Require the verified application-data parent
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- atlas_paperless_parent.ansible_facts.ansible_zfs_datasets | length == 1
|
||||
- atlas_paperless_parent.ansible_facts.ansible_zfs_datasets[0].mounted == 'yes'
|
||||
- atlas_paperless_parent.ansible_facts.ansible_zfs_datasets[0].mountpoint == atlas_app_data_mountpoint
|
||||
|
||||
- name: Create dedicated Paperless component datasets
|
||||
community.general.zfs:
|
||||
name: "{{ atlas_paperless_dataset }}{{ item }}"
|
||||
state: present
|
||||
extra_zfs_properties:
|
||||
compression: zstd
|
||||
mountpoint: "{{ atlas_paperless_root }}{{ item }}"
|
||||
loop: ['', /data, /media, /consume, /database, /cache, /ollama]
|
||||
|
||||
- name: Prepare private Paperless paths and Quadlet directory
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
owner: "{{ atlas_admin_username }}"
|
||||
group: "{{ atlas_admin_group }}"
|
||||
mode: "0700"
|
||||
loop:
|
||||
- "{{ atlas_paperless_root }}"
|
||||
- "{{ atlas_paperless_root }}/data"
|
||||
- "{{ atlas_paperless_root }}/media"
|
||||
- "{{ atlas_paperless_root }}/consume"
|
||||
- "{{ atlas_paperless_root }}/ollama"
|
||||
- "{{ atlas_paperless_private_dir }}"
|
||||
- "{{ atlas_paperless_quadlet_dir }}"
|
||||
|
||||
- name: Derive the rootless PostgreSQL host UID
|
||||
become_user: "{{ atlas_admin_username }}"
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- podman
|
||||
- unshare
|
||||
- python3
|
||||
- -c
|
||||
- >-
|
||||
print(next(int(host) + 999 - int(container) for container, host, size in
|
||||
(line.split() for line in open('/proc/self/uid_map'))
|
||||
if int(container) <= 999 < int(container) + int(size)))
|
||||
register: atlas_paperless_postgres_host_uid
|
||||
check_mode: false
|
||||
changed_when: false
|
||||
|
||||
- name: Allow the rootless PostgreSQL UID to traverse its dataset root
|
||||
ansible.builtin.file:
|
||||
path: "{{ atlas_paperless_root }}/database"
|
||||
state: directory
|
||||
owner: "{{ atlas_paperless_postgres_host_uid.stdout | trim }}"
|
||||
group: "{{ atlas_admin_group }}"
|
||||
mode: "0700"
|
||||
|
||||
- name: Allow the rootless Valkey UID to write its persistent cache
|
||||
ansible.builtin.file:
|
||||
path: "{{ atlas_paperless_root }}/cache"
|
||||
state: directory
|
||||
owner: "{{ atlas_paperless_postgres_host_uid.stdout | trim }}"
|
||||
group: "{{ atlas_admin_group }}"
|
||||
mode: "0700"
|
||||
register: atlas_paperless_cache_root
|
||||
|
||||
- name: Store Paperless secrets in private mounted files
|
||||
ansible.builtin.copy:
|
||||
content: "{{ item.value }}\n"
|
||||
dest: "{{ atlas_paperless_private_dir }}/{{ item.name }}"
|
||||
owner: "{{ atlas_admin_username }}"
|
||||
group: "{{ atlas_admin_group }}"
|
||||
mode: "0644"
|
||||
loop:
|
||||
- {name: postgres-password, value: "{{ vault_paperless_database_password }}"}
|
||||
- {name: secret-key, value: "{{ vault_paperless_secret_key }}"}
|
||||
no_log: true
|
||||
diff: false
|
||||
register: atlas_paperless_secret_files
|
||||
|
||||
- name: Admit only the Aegis gateway to the Paperless listener
|
||||
ansible.posix.firewalld:
|
||||
rich_rule: >-
|
||||
rule family="ipv4" source address="{{ atlas_aegis_ip }}"
|
||||
port port="{{ atlas_paperless_http_port }}" protocol="tcp" accept
|
||||
zone: "{{ atlas_firewalld_zone }}"
|
||||
state: enabled
|
||||
permanent: true
|
||||
immediate: true
|
||||
|
||||
- name: Keep the Paperless rootless user manager available at boot
|
||||
ansible.builtin.command:
|
||||
argv: [loginctl, enable-linger, "{{ atlas_admin_username }}"]
|
||||
args:
|
||||
creates: "/var/lib/systemd/linger/{{ atlas_admin_username }}"
|
||||
|
||||
- name: Render the private Paperless Quadlets
|
||||
ansible.builtin.template:
|
||||
src: "{{ item }}.j2"
|
||||
dest: "{{ atlas_paperless_quadlet_dir }}/{{ item }}"
|
||||
owner: "{{ atlas_admin_username }}"
|
||||
group: "{{ atlas_admin_group }}"
|
||||
mode: "0644"
|
||||
loop:
|
||||
- atlas-paperless.network
|
||||
- atlas-paperless-db.container
|
||||
- atlas-paperless-valkey.container
|
||||
- atlas-paperless-tika.container
|
||||
- atlas-paperless-gotenberg.container
|
||||
- atlas-paperless-ollama.container
|
||||
- atlas-paperless.container
|
||||
register: atlas_paperless_quadlets
|
||||
|
||||
- name: Pull, start and verify Paperless
|
||||
become_user: "{{ atlas_admin_username }}"
|
||||
environment:
|
||||
XDG_RUNTIME_DIR: "/run/user/{{ atlas_admin_uid }}"
|
||||
DBUS_SESSION_BUS_ADDRESS: "unix:path=/run/user/{{ atlas_admin_uid }}/bus"
|
||||
when: not ansible_check_mode
|
||||
block:
|
||||
- name: Pull the pinned Paperless images before starting services
|
||||
containers.podman.podman_image:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
loop:
|
||||
- "{{ atlas_paperless_image }}"
|
||||
- "{{ atlas_paperless_postgres_image }}"
|
||||
- "{{ atlas_paperless_valkey_image }}"
|
||||
- "{{ atlas_paperless_tika_image }}"
|
||||
- "{{ atlas_paperless_gotenberg_image }}"
|
||||
- "{{ atlas_paperless_ollama_image }}"
|
||||
|
||||
- name: Reload the rootless user manager for Paperless
|
||||
ansible.builtin.systemd:
|
||||
scope: user
|
||||
daemon_reload: true
|
||||
|
||||
- name: Start Paperless component services
|
||||
ansible.builtin.systemd:
|
||||
scope: user
|
||||
name: "{{ item }}"
|
||||
state: >-
|
||||
{{ 'restarted' if
|
||||
(atlas_paperless_quadlets.results |
|
||||
selectattr('item', 'equalto', item | replace('.service', '.container')) |
|
||||
selectattr('changed') | list | length > 0) or
|
||||
(atlas_paperless_quadlets.results |
|
||||
selectattr('item', 'equalto', 'atlas-paperless.network') |
|
||||
selectattr('changed') | list | length > 0) or
|
||||
(atlas_paperless_secret_files is changed and
|
||||
item in ['atlas-paperless-db.service', 'atlas-paperless.service']) or
|
||||
(atlas_paperless_cache_root is changed and
|
||||
item == 'atlas-paperless-valkey.service') else 'started' }}
|
||||
enabled: true
|
||||
loop: "{{ atlas_paperless_services }}"
|
||||
|
||||
- name: Verify the Paperless HTTP service through its LAN listener
|
||||
ansible.builtin.uri:
|
||||
url: "http://{{ ansible_host }}:{{ atlas_paperless_http_port }}/"
|
||||
status_code: [200, 302]
|
||||
register: atlas_paperless_http
|
||||
retries: 60
|
||||
delay: 5
|
||||
until: atlas_paperless_http is succeeded
|
||||
|
||||
- name: Verify the private Ollama API from Paperless
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- podman
|
||||
- exec
|
||||
- atlas-paperless
|
||||
- python3
|
||||
- -c
|
||||
- >-
|
||||
import urllib.request;
|
||||
urllib.request.urlopen('http://atlas-paperless-ollama:11434/api/tags', timeout=10).close()
|
||||
register: atlas_paperless_ollama_health
|
||||
changed_when: false
|
||||
retries: 30
|
||||
delay: 5
|
||||
until: atlas_paperless_ollama_health.rc == 0
|
||||
|
||||
- name: Check whether the local AI models are present
|
||||
ansible.builtin.command:
|
||||
argv: [podman, exec, atlas-paperless-ollama, ollama, show, "{{ item }}"]
|
||||
loop:
|
||||
- "{{ atlas_paperless_llm_model }}"
|
||||
- "{{ atlas_paperless_embedding_model }}"
|
||||
register: atlas_paperless_model_checks
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
|
||||
- name: Download missing local AI models
|
||||
ansible.builtin.command:
|
||||
argv: [podman, exec, atlas-paperless-ollama, ollama, pull, "{{ item.item }}"]
|
||||
loop: "{{ atlas_paperless_model_checks.results }}"
|
||||
when: item.rc != 0
|
||||
loop_control:
|
||||
label: "{{ item.item }}"
|
||||
|
||||
- name: Verify private Office conversion endpoints from Paperless
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- podman
|
||||
- exec
|
||||
- atlas-paperless
|
||||
- python3
|
||||
- -c
|
||||
- >-
|
||||
import urllib.request;
|
||||
urls = ['http://atlas-paperless-tika:9998/version',
|
||||
'http://atlas-paperless-gotenberg:3000/health'];
|
||||
[urllib.request.urlopen(url, timeout=10).close() for url in urls]
|
||||
register: atlas_paperless_office_health
|
||||
changed_when: false
|
||||
retries: 30
|
||||
delay: 5
|
||||
until: atlas_paperless_office_health.rc == 0
|
||||
@@ -0,0 +1,27 @@
|
||||
[Unit]
|
||||
Description=Atlas Paperless PostgreSQL
|
||||
RequiresMountsFor={{ atlas_paperless_root }}/database
|
||||
|
||||
[Container]
|
||||
ContainerName=atlas-paperless-db
|
||||
Image={{ atlas_paperless_postgres_image }}
|
||||
Network=atlas-paperless.network
|
||||
NetworkAlias=atlas-paperless-db
|
||||
Environment=POSTGRES_DB=paperless
|
||||
Environment=POSTGRES_USER=paperless
|
||||
Environment=POSTGRES_PASSWORD_FILE=/run/secrets/postgres-password
|
||||
Volume={{ atlas_paperless_private_dir }}/postgres-password:/run/secrets/postgres-password:ro,z
|
||||
Volume={{ atlas_paperless_root }}/database:/var/lib/postgresql/data:Z
|
||||
PodmanArgs=--memory=1g
|
||||
HealthCmd=pg_isready -U paperless -d paperless
|
||||
HealthInterval=30s
|
||||
HealthStartPeriod=60s
|
||||
NoNewPrivileges=true
|
||||
|
||||
[Service]
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
TimeoutStartSec=900
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
@@ -0,0 +1,20 @@
|
||||
[Unit]
|
||||
Description=Atlas Paperless private Gotenberg
|
||||
|
||||
[Container]
|
||||
ContainerName=atlas-paperless-gotenberg
|
||||
Image={{ atlas_paperless_gotenberg_image }}
|
||||
Network=atlas-paperless.network
|
||||
NetworkAlias=atlas-paperless-gotenberg
|
||||
# Keep external content and JavaScript disabled for email/Office conversion.
|
||||
Exec=gotenberg --chromium-disable-javascript=true --chromium-allow-list=^file:///tmp/.*
|
||||
PodmanArgs=--memory=2g
|
||||
NoNewPrivileges=true
|
||||
|
||||
[Service]
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
TimeoutStartSec=900
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
@@ -0,0 +1,27 @@
|
||||
[Unit]
|
||||
Description=Atlas private Paperless Ollama
|
||||
RequiresMountsFor={{ atlas_paperless_root }}/ollama
|
||||
|
||||
[Container]
|
||||
ContainerName=atlas-paperless-ollama
|
||||
Image={{ atlas_paperless_ollama_image }}
|
||||
UserNS=keep-id:uid={{ atlas_admin_uid }},gid={{ atlas_admin_gid }}
|
||||
User={{ atlas_admin_uid }}:{{ atlas_admin_gid }}
|
||||
Network=atlas-paperless.network
|
||||
Environment=OLLAMA_HOST=0.0.0.0:11434
|
||||
Environment=OLLAMA_MODELS=/models
|
||||
Environment=OLLAMA_NUM_PARALLEL=1
|
||||
Environment=OLLAMA_MAX_LOADED_MODELS=1
|
||||
Environment=OLLAMA_KEEP_ALIVE=2m
|
||||
Environment=OLLAMA_NO_CLOUD=true
|
||||
Volume={{ atlas_paperless_root }}/ollama:/models:Z
|
||||
PodmanArgs=--memory=3g
|
||||
NoNewPrivileges=true
|
||||
DropCapability=all
|
||||
|
||||
[Service]
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
@@ -0,0 +1,18 @@
|
||||
[Unit]
|
||||
Description=Atlas Paperless private Apache Tika
|
||||
|
||||
[Container]
|
||||
ContainerName=atlas-paperless-tika
|
||||
Image={{ atlas_paperless_tika_image }}
|
||||
Network=atlas-paperless.network
|
||||
NetworkAlias=atlas-paperless-tika
|
||||
PodmanArgs=--memory=1g
|
||||
NoNewPrivileges=true
|
||||
|
||||
[Service]
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
TimeoutStartSec=900
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
@@ -0,0 +1,21 @@
|
||||
[Unit]
|
||||
Description=Atlas Paperless private Valkey broker
|
||||
RequiresMountsFor={{ atlas_paperless_root }}/cache
|
||||
|
||||
[Container]
|
||||
ContainerName=atlas-paperless-valkey
|
||||
Image={{ atlas_paperless_valkey_image }}
|
||||
Network=atlas-paperless.network
|
||||
NetworkAlias=atlas-paperless-valkey
|
||||
Volume={{ atlas_paperless_root }}/cache:/data:Z
|
||||
Exec=valkey-server --appendonly yes
|
||||
PodmanArgs=--memory=256m
|
||||
NoNewPrivileges=true
|
||||
|
||||
[Service]
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
TimeoutStartSec=900
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
@@ -0,0 +1,54 @@
|
||||
[Unit]
|
||||
Description=Atlas Paperless-ngx
|
||||
Requires=atlas-paperless-db.service atlas-paperless-valkey.service atlas-paperless-tika.service atlas-paperless-gotenberg.service atlas-paperless-ollama.service
|
||||
After=atlas-paperless-db.service atlas-paperless-valkey.service atlas-paperless-tika.service atlas-paperless-gotenberg.service atlas-paperless-ollama.service
|
||||
RequiresMountsFor={{ atlas_paperless_root }}/data {{ atlas_paperless_root }}/media {{ atlas_paperless_root }}/consume
|
||||
|
||||
[Container]
|
||||
ContainerName=atlas-paperless
|
||||
Image={{ atlas_paperless_image }}
|
||||
UserNS=keep-id:uid={{ atlas_admin_uid }},gid={{ atlas_admin_gid }}
|
||||
Network=atlas-paperless.network
|
||||
PublishPort={{ ansible_host }}:{{ atlas_paperless_http_port }}:8000
|
||||
Environment=USERMAP_UID={{ atlas_admin_uid }}
|
||||
Environment=USERMAP_GID={{ atlas_admin_gid }}
|
||||
Environment=PAPERLESS_REDIS=redis://atlas-paperless-valkey:6379
|
||||
Environment=PAPERLESS_DBENGINE=postgresql
|
||||
Environment=PAPERLESS_DBHOST=atlas-paperless-db
|
||||
Environment=PAPERLESS_DBNAME=paperless
|
||||
Environment=PAPERLESS_DBUSER=paperless
|
||||
Environment=PAPERLESS_DBPASS_FILE=/run/secrets/postgres-password
|
||||
Environment=PAPERLESS_SECRET_KEY_FILE=/run/secrets/secret-key
|
||||
Environment=PAPERLESS_URL=https://{{ atlas_paperless_domain }}
|
||||
Environment=PAPERLESS_TIME_ZONE={{ atlas_timezone }}
|
||||
Environment=PAPERLESS_OCR_LANGUAGE={{ atlas_paperless_ocr_language }}
|
||||
Environment=PAPERLESS_CONSUMPTION_DIR=/usr/src/paperless/consume
|
||||
Environment=PAPERLESS_DATA_DIR=/usr/src/paperless/data
|
||||
Environment=PAPERLESS_MEDIA_ROOT=/usr/src/paperless/media
|
||||
Environment=PAPERLESS_TIKA_ENABLED=1
|
||||
Environment=PAPERLESS_TIKA_ENDPOINT=http://atlas-paperless-tika:9998
|
||||
Environment=PAPERLESS_TIKA_GOTENBERG_ENDPOINT=http://atlas-paperless-gotenberg:3000
|
||||
Environment=PAPERLESS_AI_ENABLED=true
|
||||
Environment=PAPERLESS_AI_LLM_BACKEND=ollama
|
||||
Environment=PAPERLESS_AI_LLM_ENDPOINT=http://atlas-paperless-ollama:11434
|
||||
Environment=PAPERLESS_AI_LLM_MODEL={{ atlas_paperless_llm_model }}
|
||||
Environment=PAPERLESS_AI_LLM_EMBEDDING_BACKEND=ollama
|
||||
Environment=PAPERLESS_AI_LLM_EMBEDDING_MODEL={{ atlas_paperless_embedding_model }}
|
||||
Environment=PAPERLESS_AI_LLM_CONTEXT_SIZE=2048
|
||||
Environment=PAPERLESS_AI_LLM_REQUEST_TIMEOUT=300
|
||||
Volume={{ atlas_paperless_root }}/data:/usr/src/paperless/data:Z
|
||||
Volume={{ atlas_paperless_root }}/media:/usr/src/paperless/media:Z
|
||||
Volume={{ atlas_paperless_root }}/consume:/usr/src/paperless/consume:Z
|
||||
Volume={{ atlas_paperless_private_dir }}/postgres-password:/run/secrets/postgres-password:ro,z
|
||||
Volume={{ atlas_paperless_private_dir }}/secret-key:/run/secrets/secret-key:ro,z
|
||||
PodmanArgs=--memory=2g
|
||||
NoNewPrivileges=true
|
||||
DropCapability=all
|
||||
|
||||
[Service]
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
TimeoutStartSec=900
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
@@ -0,0 +1,5 @@
|
||||
# Managed by Ansible: private rootless Paperless network.
|
||||
[Network]
|
||||
NetworkName=atlas-paperless
|
||||
Subnet={{ atlas_paperless_network_subnet }}
|
||||
Gateway={{ atlas_paperless_network_gateway }}
|
||||
Reference in New Issue
Block a user