Rework Paperless-ngx around Caddy, network, and storage roles
This commit is contained in:
1 parent
c2ecde0341
commit
83c2ca2187
14 files changed
+216
-83
No files matched your search
@@ -5,41 +5,46 @@
|
||||
source: pull
|
||||
force_source: yes
|
||||
|
||||
|
||||
- name: Ensure Paperless Directories exists
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
mode: "0755"
|
||||
loop:
|
||||
- "/var/lib/{{ host_directory }}"
|
||||
- "/var/lib/{{ host_directory }}/data"
|
||||
- "/var/lib/{{ host_directory }}/media"
|
||||
- "/var/lib/{{ host_directory }}/export"
|
||||
- "/var/lib/{{ host_directory }}/consume"
|
||||
|
||||
- name: Run Paperless-NGX Docker container
|
||||
community.docker.docker_container:
|
||||
name: "{{ container_name }}"
|
||||
image: "{{ image_name }}:{{ image_version }}"
|
||||
state: started
|
||||
restart_policy: always
|
||||
links:
|
||||
- postgres:db
|
||||
- redis:redis
|
||||
restart_policy: unless-stopped
|
||||
networks:
|
||||
- name: "{{ docker_network }}"
|
||||
env:
|
||||
PAPERLESS_URL: "https://{{ http_host }}"
|
||||
PAPERLESS_REDIS: redis://redis:6379
|
||||
PAPERLESS_DBHOST: db
|
||||
PAPERLESS_URL: "https://{{ host }}"
|
||||
PAPERLESS_REDIS: redis://{{ redis_container }}:6379
|
||||
PAPERLESS_DBHOST: "{{ postgres_container }}"
|
||||
PAPERLESS_DBUSER: "{{ postgres_user }}"
|
||||
PAPERLESS_DBPASS: "{{ postgres_password }}"
|
||||
PAPERLESS_DBNAME: "{{ postgres_db }}"
|
||||
PAPERLESS_TIME_ZONE: "{{ paperless_time_zone }}"
|
||||
USERMAP_UID: "{{ paperless_uid }}"
|
||||
USERMAP_GID: "{{ paperless_uid }}"
|
||||
PAPERLESS_CONSUMER_RECURSIVE: "true"
|
||||
# inotify cannot see changes made remotely through WebDAV, so poll
|
||||
PAPERLESS_CONSUMER_POLLING: "60"
|
||||
PAPERLESS_OCR_USER_ARGS: '{"invalidate_digital_signatures": true}'
|
||||
volumes:
|
||||
- "/var/lib/{{ host_directory }}/data:/usr/src/paperless/data"
|
||||
- "/var/lib/{{ host_directory }}/media:/usr/src/paperless/media"
|
||||
- "/var/lib/{{ host_directory }}/export:/usr/src/paperless/export"
|
||||
- "/var/lib/{{ host_directory }}/consume:/usr/src/paperless/consume"
|
||||
ports:
|
||||
- "127.0.0.1:{{ web_port }}:8000"
|
||||
- "/mnt/paperless/media:/usr/src/paperless/media:rslave"
|
||||
- "/mnt/paperless/export:/usr/src/paperless/export:rslave"
|
||||
- "/mnt/paperless/consume:/usr/src/paperless/consume:rslave"
|
||||
|
||||
- name: Export documents nightly to the Nextcloud export folder
|
||||
cron:
|
||||
name: Paperless export
|
||||
minute: "30"
|
||||
hour: "2"
|
||||
job: "docker exec {{ container_name }} document_exporter ../export -d"
|
||||
Reference in new issue
Block a user