- Add paperless.yml stack (port 8091, documents.schweitz.net) - Uses shared postgres (DB: paperless) and redis (DB 8) - ClamAV installed on host for virus scanning (port 3310) - Add Paperless integration to library-desk stack - Update CONTAINERS.md with Paperless and ClamAV profiles - Add Portainer and NPM API documentation to setup-new-host.md - Update redis-shared.yml and postgres-shared.yml with Paperless refs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
111 lines
3.3 KiB
YAML
111 lines
3.3 KiB
YAML
version: '3.8'
|
|
|
|
# Paperless-ngx - Document Management System
|
|
# Port: 8091 (HTTP)
|
|
# GPU: No
|
|
# External: documents.schweitz.net
|
|
# Storage: Configs on SSD (backed up), documents on HDD
|
|
|
|
services:
|
|
paperless:
|
|
image: ghcr.io/paperless-ngx/paperless-ngx:latest
|
|
container_name: paperless
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8091:8000"
|
|
volumes:
|
|
# SSD - configs and database (backed up)
|
|
- /home/jpmschweitzer/docker-data/paperless/data:/usr/src/paperless/data
|
|
# HDD - document storage
|
|
- /mnt/media/paperless/media:/usr/src/paperless/media
|
|
- /mnt/media/paperless/consume:/usr/src/paperless/consume
|
|
- /mnt/media/paperless/export:/usr/src/paperless/export
|
|
environment:
|
|
# Database (shared PostgreSQL)
|
|
PAPERLESS_DBENGINE: postgresql
|
|
PAPERLESS_DBHOST: postgres-shared
|
|
PAPERLESS_DBPORT: 5432
|
|
PAPERLESS_DBNAME: paperless
|
|
PAPERLESS_DBUSER: paperless_user
|
|
PAPERLESS_DBPASS: ${PAPERLESS_DB_PASSWORD}
|
|
|
|
# Redis (shared, DB 8)
|
|
PAPERLESS_REDIS: redis://redis-shared:6379/8
|
|
|
|
# Security
|
|
PAPERLESS_SECRET_KEY: ${PAPERLESS_SECRET_KEY}
|
|
|
|
# URLs
|
|
PAPERLESS_URL: https://documents.schweitz.net
|
|
PAPERLESS_ALLOWED_HOSTS: "*"
|
|
PAPERLESS_CORS_ALLOWED_HOSTS: "http://localhost:8091,https://documents.schweitz.net"
|
|
|
|
# OCR Settings
|
|
PAPERLESS_OCR_LANGUAGE: eng
|
|
PAPERLESS_OCR_LANGUAGES: nld # Install Dutch on first startup
|
|
PAPERLESS_OCR_MODE: skip
|
|
PAPERLESS_OCR_OUTPUT_TYPE: pdfa
|
|
|
|
# Webhooks (for Library Desk integration)
|
|
PAPERLESS_WEBHOOKS_ALLOW_INTERNAL_REQUESTS: "true"
|
|
|
|
# Admin user (created on first run)
|
|
PAPERLESS_ADMIN_USER: admin
|
|
PAPERLESS_ADMIN_PASSWORD: ${PAPERLESS_ADMIN_PASSWORD}
|
|
|
|
# Timezone
|
|
TZ: Europe/Amsterdam
|
|
labels:
|
|
- "com.centurylinklabs.watchtower.enable=true"
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 5
|
|
start_period: 60s
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 4G
|
|
reservations:
|
|
memory: 512M
|
|
networks:
|
|
- docker-dataplane
|
|
|
|
networks:
|
|
docker-dataplane:
|
|
external: true
|
|
name: docker-dataplane
|
|
|
|
# =============================================================================
|
|
# DEPLOYMENT INSTRUCTIONS
|
|
# =============================================================================
|
|
#
|
|
# 1. Environment variables required in Portainer:
|
|
# PAPERLESS_DB_PASSWORD=<openssl rand -hex 32>
|
|
# PAPERLESS_SECRET_KEY=<openssl rand -base64 32>
|
|
# PAPERLESS_ADMIN_PASSWORD=<your-admin-password>
|
|
#
|
|
# 2. Database already created in postgres-shared:
|
|
# Database: paperless
|
|
# User: paperless_user
|
|
#
|
|
# 3. Redis using shared instance DB 8
|
|
#
|
|
# 4. After deployment, configure NPM:
|
|
# Domain: documents.schweitz.net
|
|
# Forward: paperless:8000 or 192.168.86.149:8091
|
|
# SSL: Let's Encrypt
|
|
# Websockets: Enable
|
|
#
|
|
# 5. Post-deployment in Paperless UI:
|
|
# - Create API token (My Profile → API Token)
|
|
# - Create custom fields: source_url, library_indexed, library_doc_id, collection
|
|
# - Create webhook workflow to http://library-desk:8089/documents/webhook
|
|
#
|
|
# 6. ClamAV is running on host at 192.168.86.149:3310
|
|
# Configure Library Desk with:
|
|
# CLAMAV_HOST=192.168.86.149
|
|
# CLAMAV_PORT=3310
|
|
# CLAMAV_ENABLED=true
|