Browse Source

Add Paperless-ngx (#1047)

Co-authored-by: nmfretz <nmfretz@gmail.com>
main
highghlow 7 months ago
committed by GitHub
parent
commit
3cb4c100c1
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 0
      paperless/data/data/.gitkeep
  2. 0
      paperless/data/media/.gitkeep
  3. 0
      paperless/data/pgdata/.gitkeep
  4. 0
      paperless/data/redisdata/.gitkeep
  5. 61
      paperless/docker-compose.yml
  6. 32
      paperless/exports.sh
  7. 40
      paperless/umbrel-app.yml

0
paperless/data/data/.gitkeep

0
paperless/data/media/.gitkeep

0
paperless/data/pgdata/.gitkeep

0
paperless/data/redisdata/.gitkeep

61
paperless/docker-compose.yml

@ -0,0 +1,61 @@
version: "3.7"
services:
app_proxy:
environment:
APP_HOST: paperless_webserver_1
APP_PORT: 8000
broker:
image: docker.io/library/redis:7@sha256:d6ecc832969a4827645a083da38345327b3447772fe907e7d4311c79b4e3a06e
restart: on-failure
volumes:
- ${APP_DATA_DIR}/data/redisdata:/data
db:
image: docker.io/library/postgres:16
restart: unless-stopped
volumes:
- ${APP_DATA_DIR}/data/pgdata:/var/lib/postgresql/data
environment:
POSTGRES_DB: paperless
POSTGRES_USER: paperless
POSTGRES_PASSWORD: paperless
webserver:
image: ghcr.io/paperless-ngx/paperless-ngx:2.7.2@sha256:703c990a790dfd4d25fb56df3afec27b13cb0926a3818bf265edac9c71311647
restart: on-failure
depends_on:
- db
- broker
- gotenberg
- tika
volumes:
- ${APP_DATA_DIR}/data/data:/usr/src/paperless/data
- ${APP_DATA_DIR}/data/media:/usr/src/paperless/media
# TODO: move these inside the paperless app data dir once umbrelOS supports navigating to it via the UI
- ${UMBREL_ROOT}/data/storage/paperless/export:/usr/src/paperless/export
- ${UMBREL_ROOT}/data/storage/paperless/consume:/usr/src/paperless/consume
environment:
PAPERLESS_REDIS: redis://paperless_broker_1:6379
PAPERLESS_DBHOST: paperless_db_1
PAPERLESS_TIKA_ENABLED: 1
PAPERLESS_TIKA_GOTENBERG_ENDPOINT: http://paperless_gotenberg_1:3000
PAPERLESS_TIKA_ENDPOINT: http://paperless_tika_1:9998
PAPERLESS_ADMIN_USER: admin
PAPERLESS_ADMIN_PASSWORD: $APP_PASSWORD
gotenberg:
image: docker.io/gotenberg/gotenberg:7.10@sha256:d03b8a04c6e6c5e568b38f57352266dee4674849b71818774025f8f48d869a9a
restart: on-failure
# The gotenberg chromium route is used to convert .eml files. We do not
# want to allow external content like tracking pixels or even javascript.
command:
- "gotenberg"
- "--chromium-disable-javascript=true"
- "--chromium-allow-list=file:///tmp/.*"
tika:
image: ghcr.io/paperless-ngx/tika:2.9.1-minimal@sha256:20db3df89eaeb1b271dd840888fe909b88b12f4b86ef641ec07a1d45d4c5168f
restart: on-failure

32
paperless/exports.sh

@ -0,0 +1,32 @@
# Ensure that Paperless consume and export directories are created with the correct permissions
UMBREL_DATA_DIR="${UMBREL_ROOT}/data"
UMBREL_DATA_STORAGE_DIR="${UMBREL_DATA_DIR}/storage"
UMBREL_DATA_STORAGE_PAPERLESS_DIR="${UMBREL_DATA_STORAGE_DIR}/paperless"
UMBREL_DATA_STORAGE_PAPERLESS_CONSUME_DIR="${UMBREL_DATA_STORAGE_PAPERLESS_DIR}/consume"
UMBREL_DATA_STORAGE_PAPERLESS_EXPORT_DIR="${UMBREL_DATA_STORAGE_PAPERLESS_DIR}/export"
DESIRED_OWNER="1000:1000"
if [[ ! -d "${UMBREL_DATA_STORAGE_PAPERLESS_CONSUME_DIR}" ]]; then
mkdir -p "${UMBREL_DATA_STORAGE_PAPERLESS_CONSUME_DIR}"
fi
if [[ ! -d "${UMBREL_DATA_STORAGE_PAPERLESS_EXPORT_DIR}" ]]; then
mkdir -p "${UMBREL_DATA_STORAGE_PAPERLESS_EXPORT_DIR}"
fi
set_paperless_correct_permissions() {
local -r path="${1}"
if [[ -d "${path}" ]]; then
owner=$(stat -c "%u:%g" "${path}")
if [[ "${owner}" != "${DESIRED_OWNER}" ]]; then
chown "${DESIRED_OWNER}" "${path}"
fi
fi
}
set_paperless_correct_permissions "${UMBREL_DATA_STORAGE_DIR}"
set_paperless_correct_permissions "${UMBREL_DATA_STORAGE_PAPERLESS_DIR}"
set_paperless_correct_permissions "${UMBREL_DATA_STORAGE_PAPERLESS_CONSUME_DIR}"
set_paperless_correct_permissions "${UMBREL_DATA_STORAGE_PAPERLESS_EXPORT_DIR}"

40
paperless/umbrel-app.yml

@ -0,0 +1,40 @@
manifestVersion: 1
id: paperless
category: files
name: Paperless-ngx
version: "2.7.2"
tagline: Transform your physical documents into a searchable online archive
description: >-
Paperless-ngx is a community-supported open-source document management system that transforms your physical documents into a searchable online archive so you can keep, well, less paper.
- Organize and index your scanned documents with tags, correspondents, types, and more.
- Your data is stored locally on your server and is never transmitted or shared in any way.
- Performs OCR on your documents, adding searchable and selectable text, even to documents scanned with only images.
- Utilizes the open-source Tesseract engine to recognize more than 100 languages.
- Documents are saved as PDF/A format which is designed for long term storage, alongside the unaltered originals.
- Uses machine-learning to automatically add tags, correspondents and document types to your documents.
- Supports PDF documents, images, plain text files, Office documents (Word, Excel, Powerpoint, and LibreOffice equivalents)1 and more.
- Paperless stores your documents plain on disk. Filenames and folders are managed by paperless and their format can be configured freely with different configurations assigned to different documents.
releaseNotes: ""
developer: Paperless-ngx Community
website: https://docs.paperless-ngx.com/
dependencies: []
repo: https://github.com/paperless-ngx/paperless-ngx
support: https://github.com/paperless-ngx/paperless-ngx/discussions
port: 2349
gallery:
- 1.jpg
- 2.jpg
- 3.jpg
path: ""
defaultUsername: "admin"
deterministicPassword: true
submitter: highghlow
submission: https://github.com/getumbrel/umbrel-apps/pull/1047
Loading…
Cancel
Save