4252121519
paperless-ngx and calibre-web are the only two catalog apps with a drop-zone,
and each has exactly ONE ingest bind. Both move from ${USERDATA_PATH}/import/<app>
to ${IMPORT_PATH}/<app> — the canonical root on the system drive — so a
multi-drive box has one drop-zone instead of one real folder plus a dead
lookalike on every other drive (and import/* is class: excluded, so files
stranded in a dead one would never be backed up either).
The matching backup: entries move to the new `import:` list IN THE SAME COMMIT.
This is not cosmetic: ValidateBackupSpec rejects an entry matching no compose
bind, and the rejection is WHOLE-BLOCK, so a stale `userdata: import/paperless`
would have discarded paperless's `hdd: appdata/paperless/media class: mandatory`
too and silently degraded the customer's document originals to legacy handling.
Both classes stay `excluded` — the move must not change data handling.
New data_paths: blocks on paperless-ngx, calibre-web and romm — role + Hungarian
label over paths that already exist as compose binds. Covers all three roles and
the multi-entry case. Requires controller v0.172.0 (deployed to both demo boxes
before this push, since ${IMPORT_PATH} is unset on older controllers).
Storage-layout header comments updated in both composes — they are the only
in-repo documentation of the layout.
147 lines
5.7 KiB
YAML
147 lines
5.7 KiB
YAML
# Paperless-ngx - Document Management System (DMS)
|
|
# Domain: ${SUBDOMAIN}.${DOMAIN}
|
|
# Database: PostgreSQL + Redis
|
|
# RAM: ~500MB (mem_limit: 1152M total — paperless 768M + postgres 256M + redis 128M) | Pi-compatible: Yes (arm64, 4GB+ RAM recommended)
|
|
#
|
|
# Environment variables:
|
|
# DOMAIN - Your domain (e.g., demo-felhom.eu)
|
|
# HDD_PATH - Drive namespace root (managed media/export under appdata)
|
|
# USERDATA_PATH - Ügyfél-tartalom gyökér (<namespace>/userdata)
|
|
# IMPORT_PATH - KANONIKUS beolvasási gyökér a rendszerlemezen (R-75) — NEM az app lemezén
|
|
# PAPERLESS_SECRET_KEY - Random secret (auto-generated)
|
|
# DB_PASSWORD - PostgreSQL password (auto-generated)
|
|
# PAPERLESS_ADMIN_USER - Initial admin username (default: admin)
|
|
# PAPERLESS_ADMIN_PASSWORD - Initial admin password
|
|
#
|
|
# Storage layout (felhom userdata convention):
|
|
# Consume drop-zone → ${IMPORT_PATH}/paperless (browsable — drop files here via FileBrowser)
|
|
# ^ CANONICAL: one import root for the whole box, on the SYSTEM drive — NOT per data drive.
|
|
# Each drop-zone app has exactly ONE ingest bind, so a per-drive import/ would put a folder
|
|
# that looks like a drop-zone on every drive while only one of them does anything.
|
|
# Document media → ${HDD_PATH}/appdata/paperless/media (app-managed originals + archive)
|
|
# Export folder → ${HDD_PATH}/appdata/paperless/export (app-managed backups)
|
|
# App data/index → paperless_data (named volume, NVMe)
|
|
# Run-identity: USERMAP_UID/GID 1000 → paperless consumes + DELETES from the import drop-zone
|
|
# (group 1000, setgid 2775) without permission errors.
|
|
# PostgreSQL data → paperless_postgres_data (named volume, NVMe)
|
|
# Redis data → paperless_redis_data (named volume, NVMe)
|
|
#
|
|
# First-time setup:
|
|
# If PAPERLESS_ADMIN_USER/PASSWORD env vars are set, admin is auto-created.
|
|
# Otherwise: docker exec -it paperless-webserver createsuperuser
|
|
|
|
services:
|
|
paperless-webserver:
|
|
image: ghcr.io/paperless-ngx/paperless-ngx:2.20.15
|
|
container_name: paperless-webserver
|
|
restart: unless-stopped
|
|
depends_on:
|
|
paperless-postgres:
|
|
condition: service_healthy
|
|
paperless-redis:
|
|
condition: service_healthy
|
|
environment:
|
|
- PAPERLESS_REDIS=redis://paperless-redis:6379
|
|
- PAPERLESS_DBHOST=paperless-postgres
|
|
- PAPERLESS_DBUSER=paperless
|
|
- PAPERLESS_DBPASS=${DB_PASSWORD}
|
|
- PAPERLESS_DBNAME=paperless
|
|
- PAPERLESS_SECRET_KEY=${PAPERLESS_SECRET_KEY}
|
|
- PAPERLESS_URL=https://${SUBDOMAIN}.${DOMAIN}
|
|
- PAPERLESS_TIME_ZONE=Europe/Budapest
|
|
# PAPERLESS_OCR_LANGUAGE selects the OCR engine language(s) — "+"-joined (e.g. hun+eng).
|
|
# PAPERLESS_OCR_LANGUAGES is the INSTALL list and must be SPACE-separated (the image apt-installs
|
|
# tesseract-ocr-<each>). Reusing the "+"-joined value here installed a bogus "tesseract-ocr-hun+eng"
|
|
# → hun pack missing → Django check crash-loop. Fixed: a space-separated superset of every offered
|
|
# option (eng bundled; hun/deu installed at boot — verified installable).
|
|
- PAPERLESS_OCR_LANGUAGE=${PAPERLESS_OCR_LANGUAGE:-eng}
|
|
- PAPERLESS_OCR_LANGUAGES=eng hun deu
|
|
- PAPERLESS_ADMIN_USER=${PAPERLESS_ADMIN_USER:-}
|
|
- PAPERLESS_ADMIN_PASSWORD=${PAPERLESS_ADMIN_PASSWORD:-}
|
|
- PAPERLESS_CONSUMER_POLLING=30
|
|
- PAPERLESS_TASK_WORKERS=2
|
|
- PAPERLESS_THREADS_PER_WORKER=1
|
|
- USERMAP_UID=1000
|
|
- USERMAP_GID=1000
|
|
- TZ=Europe/Budapest
|
|
volumes:
|
|
- paperless_data:/usr/src/paperless/data
|
|
- ${HDD_PATH}/appdata/paperless/media:/usr/src/paperless/media
|
|
- ${IMPORT_PATH}/paperless:/usr/src/paperless/consume
|
|
- ${HDD_PATH}/appdata/paperless/export:/usr/src/paperless/export
|
|
networks:
|
|
- traefik-public
|
|
- paperless-internal
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 768M
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://127.0.0.1:8000"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 5
|
|
start_period: 60s
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.paperless.rule=Host(`${SUBDOMAIN}.${DOMAIN}`)"
|
|
- "traefik.http.routers.paperless.entrypoints=websecure"
|
|
- "traefik.http.routers.paperless.tls=true"
|
|
- "traefik.http.routers.paperless.tls.certresolver=letsencrypt"
|
|
- "traefik.http.services.paperless.loadbalancer.server.port=8000"
|
|
|
|
paperless-postgres:
|
|
image: postgres:16-alpine
|
|
container_name: paperless-postgres
|
|
restart: unless-stopped
|
|
environment:
|
|
- POSTGRES_USER=paperless
|
|
- POSTGRES_PASSWORD=${DB_PASSWORD}
|
|
- POSTGRES_DB=paperless
|
|
- TZ=Europe/Budapest
|
|
volumes:
|
|
- paperless_postgres_data:/var/lib/postgresql/data
|
|
networks:
|
|
- paperless-internal
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 256M
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U paperless -d paperless"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 20s
|
|
|
|
paperless-redis:
|
|
image: redis:7-alpine
|
|
container_name: paperless-redis
|
|
restart: unless-stopped
|
|
command: redis-server --appendonly yes
|
|
environment:
|
|
- TZ=Europe/Budapest
|
|
volumes:
|
|
- paperless_redis_data:/data
|
|
networks:
|
|
- paperless-internal
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 128M
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3
|
|
|
|
volumes:
|
|
paperless_data:
|
|
paperless_postgres_data:
|
|
paperless_redis_data:
|
|
|
|
networks:
|
|
traefik-public:
|
|
external: true
|
|
paperless-internal:
|