paperless-ngx o11y

main
Alpha Chen 10 months ago
parent 26e7a4981d
commit af19f7746c
Signed by: alpha
SSH Key Fingerprint: SHA256:3fOT8fiYQG/aK9ntivV3Bqtg8AYQ7q4nV6ZgihOA20g

@ -17,6 +17,13 @@
- export - export
- media - media
- name: Celery monitoring configuration
ansible.builtin.copy:
content: |
url_prefix = "/flower/"
dest: /mnt/lotus-land-story/paperless-ngx/flowerconfig.py
mode: "0644"
- name: Get docker network - name: Get docker network
community.docker.docker_network: community.docker.docker_network:
name: lotus_land_story name: lotus_land_story
@ -29,6 +36,7 @@
name: paperless-ngx name: paperless-ngx
image: ghcr.io/paperless-ngx/paperless-ngx:{{ version }} image: ghcr.io/paperless-ngx/paperless-ngx:{{ version }}
env: env:
PAPERLESS_ENABLE_FLOWER: "true"
PAPERLESS_ENABLE_HTTP_REMOTE_USER: "true" PAPERLESS_ENABLE_HTTP_REMOTE_USER: "true"
PAPERLESS_REDIS: redis://host.docker.internal:6379 PAPERLESS_REDIS: redis://host.docker.internal:6379
PAPERLESS_TIME_ZONE: America/Los_Angeles PAPERLESS_TIME_ZONE: America/Los_Angeles
@ -39,12 +47,14 @@
- /mnt/lotus-land-story/paperless-ngx/media:/usr/src/paperless/media - /mnt/lotus-land-story/paperless-ngx/media:/usr/src/paperless/media
- /mnt/lotus-land-story/paperless-ngx/export:/usr/src/paperless/export - /mnt/lotus-land-story/paperless-ngx/export:/usr/src/paperless/export
- /mnt/lotus-land-story/paperless-ngx/consume:/usr/src/paperless/consume - /mnt/lotus-land-story/paperless-ngx/consume:/usr/src/paperless/consume
- /mnt/lotus-land-story/paperless-ngx/flowerconfig.py:/usr/src/paperless/src/paperless/flowerconfig.py:ro
restart_policy: unless-stopped restart_policy: unless-stopped
networks: networks:
- name: lotus_land_story - name: lotus_land_story
etc_hosts: etc_hosts:
host.docker.internal: host-gateway host.docker.internal: host-gateway
handlers: handlers:
- name: Import restarts - name: Import restarts
ansible.builtin.import_tasks: restarts.yml ansible.builtin.import_tasks: restarts.yml

@ -67,3 +67,24 @@ books.{{ domain }} {
import trusted_proxy_list import trusted_proxy_list
} }
} }
paperless.{{ domain }} {
forward_auth authelia:9091 {
uri /api/verify?rd=https://auth.{{ domain }}
copy_headers Remote-User
# This import needs to be included if you're relying on a trusted proxies configuration.
import trusted_proxy_list
}
reverse_proxy paperless-ngx:8000 {
import trusted_proxy_list
}
redir /flower /flower/
handle /flower/* {
reverse_proxy paperless-ngx:5555
}
}
# vim: ts=4

@ -64,3 +64,10 @@ scrape_configs:
static_configs: static_configs:
- targets: - targets:
- {{ prometheus.akkoma.target }} - {{ prometheus.akkoma.target }}
- job_name: paperless
metrics_path: /flower/metrics
static_configs:
- targets: ['paperless-ngx:5555']
# vim: ft=yaml.ansible

Loading…
Cancel
Save