9 Commits
2 changed files with 99 additions and 103 deletions
+37
View File
@@ -0,0 +1,37 @@
###############################################################################
# Paperless-ngx settings #
###############################################################################
# See http://docs.paperless-ngx.com/configuration/ for all available options.
# The UID and GID of the user used to run paperless in the container. Set this
# to your UID and GID on the host so that you have write access to the
# consumption directory.
USERMAP_UID=1026
USERMAP_GID=100
# See the documentation linked above for all options. A few commonly adjusted settings
# are provided below.
# This is required if you will be exposing Paperless-ngx on a public domain
# (if doing so please consider security measures such as reverse proxy)
PAPERLESS_URL=https://paperless.sda.zone
# Required. A unique secret key for session tokens and signing.
# Generate with: python3 -c "import secrets; print(secrets.token_urlsafe(64))"
PAPERLESS_SECRET_KEY=C@ptn&mo
# Use this variable to set a timezone for the Paperless Docker containers. Defaults to UTC.
#PAPERLESS_TIME_ZONE=America/Los_Angeles
# The default language to use for OCR. Set this to the language most of your
# documents are written in.
PAPERLESS_OCR_LANGUAGE=fra
# Additional languages to install for text recognition, separated by a whitespace.
# Note that this is different from PAPERLESS_OCR_LANGUAGE (default=eng), which defines
# the language used for OCR.
# The container installs English, German, Italian, Spanish and French by default.
# See https://packages.debian.org/search?keywords=tesseract-ocr-&searchon=names
# for available languages.
#PAPERLESS_OCR_LANGUAGES=tur ces
+62 -103
View File
@@ -1,120 +1,79 @@
services: services:
redis: broker:
image: redis:7 image: docker.io/library/redis:8
command: restart: unless-stopped
- /bin/sh
- -c
- redis-server --requirepass redispass
container_name: PaperlessNGX-REDIS
hostname: paper-redis
mem_limit: 512m
mem_reservation: 256m
cpu_shares: 768
security_opt:
- no-new-privileges:true
read_only: true
user: 1026:100
healthcheck:
test: ["CMD-SHELL", "redis-cli ping || exit 1"]
volumes:
- /volume1/docker/paperlessngx/redis:/data:rw
environment: environment:
TZ: Europe/Bucharest TZ: Europe/Paris
restart: on-failure:5 volumes:
- /volume1/docker/paperless/paperless_redisdata:/data
db: db:
image: postgres:17 image: docker.io/library/postgres:18
container_name: PaperlessNGX-DB restart: unless-stopped
hostname: paper-db
mem_limit: 1g
cpu_shares: 768
security_opt:
- no-new-privileges:true
healthcheck:
test: ["CMD", "pg_isready", "-q", "-d", "paperless", "-U", "paperlessuser"]
timeout: 45s
interval: 10s
retries: 10
volumes: volumes:
- /volume1/docker/paperlessngx/db:/var/lib/postgresql/data:rw - /volume1/docker/paperless/paperless_pgdata:/var/lib/postgresql
environment: environment:
TZ: Europe/Paris
POSTGRES_DB: paperless POSTGRES_DB: paperless
POSTGRES_USER: paperlessuser POSTGRES_USER: paperless
POSTGRES_PASSWORD: paperlesspass POSTGRES_PASSWORD: paperless
restart: on-failure:5
webserver:
image: ghcr.io/paperless-ngx/paperless-ngx:latest
restart: unless-stopped
depends_on:
- db
- broker
- gotenberg
- tika
ports:
- "8000:8000"
volumes:
- /volume1/docker/paperless/paperless_data:/usr/src/paperless/data
- /volume1/docker/paperless/paperless_media:/usr/src/paperless/media
- /volume1/Datas/_ToPaperless/Export:/usr/src/paperless/export
- /volume1/Datas/_ToPaperless/Consume:/usr/src/paperless/consume
env_file: docker-compose.env
environment:
TZ: Europe/Paris
PAPERLESS_REDIS: redis://broker:6379
PAPERLESS_DBHOST: db
PAPERLESS_DBENGINE: postgresql
PAPERLESS_TIKA_ENABLED: 1
PAPERLESS_TIKA_GOTENBERG_ENDPOINT: http://gotenberg:3000
PAPERLESS_TIKA_ENDPOINT: http://tika:9998
gotenberg: gotenberg:
image: gotenberg/gotenberg:latest image: docker.io/gotenberg/gotenberg:8.27
container_name: PaperlessNGX-GOTENBERG restart: unless-stopped
hostname: gotenberg environment:
security_opt: TZ: Europe/Paris
- no-new-privileges:true # The gotenberg chromium route is used to convert .eml files. We do not
user: 1026:100 # want to allow external content like tracking pixels or even javascript.
command: command:
- "gotenberg" - "gotenberg"
- "--chromium-disable-javascript=true" - "--chromium-disable-javascript=true"
- "--chromium-allow-list=file:///tmp/.*" - "--chromium-allow-list=file:///tmp/.*"
restart: on-failure:5
tika: tika:
image: ghcr.io/paperless-ngx/tika:latest image: docker.io/apache/tika:latest
container_name: PaperlessNGX-TIKA restart: unless-stopped
hostname: tika
security_opt:
- no-new-privileges:true
user: 1026:100
restart: on-failure:5
paperless:
image: ghcr.io/paperless-ngx/paperless-ngx:latest
container_name: PaperlessNGX
hostname: paperless-ngx
mem_limit: 6g
cpu_shares: 1024
security_opt:
- no-new-privileges:true
healthcheck:
test: ["CMD", "curl", "-fs", "-S", "--max-time", "2", "http://localhost:8000"]
interval: 30s
timeout: 10s
retries: 5
ports:
- 8777:8000
volumes:
- /volume1/docker/paperlessngx/data:/usr/src/paperless/data:rw
- /volume1/docker/paperlessngx/media:/usr/src/paperless/media:rw
- /volume1/docker/paperlessngx/export:/usr/src/paperless/export:rw
- /volume1/docker/paperlessngx/consume:/usr/src/paperless/consume:rw
- /volume1/docker/paperlessngx/trash:/usr/src/paperless/trash:rw
environment: environment:
PAPERLESS_REDIS: redis://:redispass@paper-redis:6379 TZ: Europe/Paris
PAPERLESS_DBENGINE: postgresql
PAPERLESS_DBHOST: paper-db paperlessngx-ai:
PAPERLESS_DBNAME: paperless image: clusterzx/paperless-ai
PAPERLESS_DBUSER: paperlessuser container_name: PaperlessNGX-AI
PAPERLESS_DBPASS: paperlesspass environment:
PAPERLESS_EMPTY_TRASH_DIR: ../trash TZ: Europe/Paris
PAPERLESS_FILENAME_FORMAT: '{{ created_year }}/{{ correspondent }}/{{ document_type }}/{{ title }}' healthcheck:
PAPERLESS_OCR_ROTATE_PAGES_THRESHOLD: 6 test: timeout 10s bash -c ':> /dev/tcp/127.0.0.1/3000' || exit 1
PAPERLESS_TASK_WORKERS: 1 interval: 10s
USERMAP_UID: 1026 timeout: 5s
USERMAP_GID: 100 retries: 3
PAPERLESS_TIME_ZONE: Europe/Bucharest start_period: 90s
PAPERLESS_ADMIN_USER: marius volumes:
PAPERLESS_ADMIN_PASSWORD: mariushosting - /volume1/docker/paperless/paperless_paperlessngxai:/app/data:rw
PAPERLESS_URL: https://paperlessngx.yourname.synology.me ports:
PAPERLESS_CSRF_TRUSTED_ORIGINS: https://paperlessngx.yourname.synology.me - "3747:3000"
PAPERLESS_OCR_LANGUAGE: deu+eng
PAPERLESS_TIKA_ENABLED: 1
PAPERLESS_TIKA_GOTENBERG_ENDPOINT: http://gotenberg:3000
PAPERLESS_TIKA_ENDPOINT: http://tika:9998
restart: on-failure:5 restart: on-failure:5
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
tika:
condition: service_started
gotenberg:
condition: service_started