gistfile1.txt
· 5.7 KiB · Text
Sin formato
# The folowing Docker-Compose file install paperless-ngx
# using redis as fast memory-database cache and
# Tika as a content analyse- and data-detection Tool and
# Gotenberg for use Paperless with office tools lke Ms-Office or Libre-Office
# To save the Data, Paperless ngx use normally a SQLITE-Database whitch works in Paperless.
# But it is possible to externel Database systems like
# PostgreSQL
# MySQL
# MARIADB
# It is possible to install a new Database-Docker-Image or use an existing Database-Docker-Image
# The following Installation of the Docker-Image for paperless-ngx use an existing Mariadb-Docker-Image
# Before you start this installation you have to prepare some things in the existing MARIADB-Docker-Image
# You can prepare this things with MyPHPAdmin:
# 1. you must create a new Database for Paperless with its name 'paperless' before install this Docker-Compose
# 2. you must create a new User for the Database 'paperless# and give the user the name 'paperless'
# 3. Grant all privilegs to this User
# 4. you must set a password for the Database
# Note all this settings and enter it at the environment-variables
# Normally Docker use folders under the folder Volume1/docker/ for saving Data outside of the Docker-Image
# But for paperless i did realise a folder 'paperless' directly in Volume1 outside from docker/
services:
redis:
image: redis:7
command:
- /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/paperless/redis:/data:rw
environment:
TZ: Europe/Berlin
restart: on-failure:5
gotenberg:
image: gotenberg/gotenberg:latest
container_name: PaperlessNGX-GOTENBERG
hostname: gotenberg
security_opt:
- no-new-privileges:true
user: 1026:100
command:
- "gotenberg"
- "--chromium-disable-javascript=true"
- "--chromium-allow-list=file:///tmp/.*"
restart: on-failure:5
tika:
image: ghcr.io/paperless-ngx/tika:latest
container_name: PaperlessNGX-TIKA
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: 10g
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 # switch Port 8000 to 8777 (you can set another)
volumes: # set the folders
- /volume1/paperless/data:/usr/src/paperless/data:rw
- /volume1/paperless/media:/usr/src/paperless/media:rw
- /volume1/paperless/export:/usr/src/paperless/export:rw
- /volume1/paperless/consume:/usr/src/paperless/consume:rw
- /volume1/paperless/trash:/usr/src/paperless/trash:rw
- /volume1/paperless/hooks:/usr/src/paperless/scripts
environment:
PAPERLESS_REDIS: redis://:redispass@paper-redis:6379
PAPERLESS_DBENGINE: mariadb # Set mariadb as dbengine
PAPERLESS_DBHOST: 192.168.XXX.XXX # IP address of the Synology NAS
PAPERLESS_DBNAME: paperless # you must setup this Database before install this Docker-Compose
PAPERLESS_DBUSER: paperless # This user must Grant all permissions to the Database 'paperless'
PAPERLESS_DBPASS: yourPassword # Set your password for the Database 'paperless'
PAPERLESS_URL: https://paperlessngx.
PAPERLESS_CSRF_TRUSTED_ORIGINS: https://paperlessngx.hphds918.synology.me
PAPERLESS_FILENAME_FORMAT: YOUR FILENAME FORMAT # e. g. '{created_year}/{document_type}/{correspondent}/{title}'
PAPERLESS_SECRET_KEY: YOUR SECRETE # e. g. 'Aig!2?zy'
PAPERLESS_OCR_LANGUAGE: YOURLANGUAGE # e. g. 'deu'
PAPERLESS_TIME_ZONE: YOUR-TIME-ZONE # e. g. 'Europe/Berlin'
PAPERLESS_ADMIN_USER: YOUR-ADMIN-USERNAME # e. g. 'jean'
PAPERLESS_ADMIN_PASSWORD: YOUR-ADMIN-PASSWORD # e.g. '?urshn!'
USERMAP_UID: 1026 # Your UserMap UID
USERMAP_GID: 100 # Your UserMap GID
PAPERLESS_TASK_WORKERS: 2 # Number of Task Workers
PAPERLESS_TIKA_ENABLED: 1
PAPERLESS_TIKA_GOTENBERG_ENDPOINT: http://gotenberg:3000
PAPERLESS_TIKA_ENDPOINT: http://tika:9998
# write here the own Domain after localhost, when using a Proxy-Host, otherwise delete this environment-variable.
# PAPERLESS_ALLOWED_HOSTS: "localhost, paperlessngx.hphds918.synology.me"
PAPERLESS_CONSUMER_ENABLE_BARCODES: true # If you would read Barcodes
PAPERLESS_CONSUMER_ENABLE_ASN_BARCODE: true # If you would like QR-ASN-Codes
PAPERLESS_CONSUMER_BARCODE_SCANNER: ZXING ' ZXING as Scanner
restart: on-failure:5
depends_on:
redis:
condition: service_started
tika:
condition: service_started
gotenberg:
condition: service_started
| 1 | # The folowing Docker-Compose file install paperless-ngx |
| 2 | # using redis as fast memory-database cache and |
| 3 | # Tika as a content analyse- and data-detection Tool and |
| 4 | # Gotenberg for use Paperless with office tools lke Ms-Office or Libre-Office |
| 5 | # To save the Data, Paperless ngx use normally a SQLITE-Database whitch works in Paperless. |
| 6 | # But it is possible to externel Database systems like |
| 7 | # PostgreSQL |
| 8 | # MySQL |
| 9 | # MARIADB |
| 10 | # It is possible to install a new Database-Docker-Image or use an existing Database-Docker-Image |
| 11 | |
| 12 | # The following Installation of the Docker-Image for paperless-ngx use an existing Mariadb-Docker-Image |
| 13 | # Before you start this installation you have to prepare some things in the existing MARIADB-Docker-Image |
| 14 | # You can prepare this things with MyPHPAdmin: |
| 15 | |
| 16 | # 1. you must create a new Database for Paperless with its name 'paperless' before install this Docker-Compose |
| 17 | # 2. you must create a new User for the Database 'paperless# and give the user the name 'paperless' |
| 18 | # 3. Grant all privilegs to this User |
| 19 | # 4. you must set a password for the Database |
| 20 | |
| 21 | # Note all this settings and enter it at the environment-variables |
| 22 | |
| 23 | # Normally Docker use folders under the folder Volume1/docker/ for saving Data outside of the Docker-Image |
| 24 | # But for paperless i did realise a folder 'paperless' directly in Volume1 outside from docker/ |
| 25 | |
| 26 | services: |
| 27 | redis: |
| 28 | image: redis:7 |
| 29 | command: |
| 30 | - /bin/sh |
| 31 | - -c |
| 32 | - redis-server --requirepass redispass |
| 33 | container_name: PaperlessNGX-REDIS |
| 34 | hostname: paper-redis |
| 35 | mem_limit: 512m |
| 36 | mem_reservation: 256m |
| 37 | cpu_shares: 768 |
| 38 | security_opt: |
| 39 | - no-new-privileges:true |
| 40 | read_only: true |
| 41 | user: 1026:100 |
| 42 | healthcheck: |
| 43 | test: ["CMD-SHELL", "redis-cli ping || exit 1"] |
| 44 | volumes: |
| 45 | - /volume1/paperless/redis:/data:rw |
| 46 | environment: |
| 47 | TZ: Europe/Berlin |
| 48 | restart: on-failure:5 |
| 49 | |
| 50 | gotenberg: |
| 51 | image: gotenberg/gotenberg:latest |
| 52 | container_name: PaperlessNGX-GOTENBERG |
| 53 | hostname: gotenberg |
| 54 | security_opt: |
| 55 | - no-new-privileges:true |
| 56 | user: 1026:100 |
| 57 | command: |
| 58 | - "gotenberg" |
| 59 | - "--chromium-disable-javascript=true" |
| 60 | - "--chromium-allow-list=file:///tmp/.*" |
| 61 | restart: on-failure:5 |
| 62 | |
| 63 | tika: |
| 64 | image: ghcr.io/paperless-ngx/tika:latest |
| 65 | container_name: PaperlessNGX-TIKA |
| 66 | hostname: tika |
| 67 | security_opt: |
| 68 | - no-new-privileges:true |
| 69 | user: 1026:100 |
| 70 | restart: on-failure:5 |
| 71 | |
| 72 | paperless: |
| 73 | image: ghcr.io/paperless-ngx/paperless-ngx:latest |
| 74 | container_name: PaperlessNGX |
| 75 | hostname: paperless-ngx |
| 76 | mem_limit: 10g |
| 77 | cpu_shares: 1024 |
| 78 | security_opt: |
| 79 | - no-new-privileges:true |
| 80 | healthcheck: |
| 81 | test: ["CMD", "curl", "-fs", "-S", "--max-time", "2", "http://localhost:8000"] |
| 82 | interval: 30s |
| 83 | timeout: 10s |
| 84 | retries: 5 |
| 85 | ports: |
| 86 | - 8777:8000 # switch Port 8000 to 8777 (you can set another) |
| 87 | volumes: # set the folders |
| 88 | - /volume1/paperless/data:/usr/src/paperless/data:rw |
| 89 | - /volume1/paperless/media:/usr/src/paperless/media:rw |
| 90 | - /volume1/paperless/export:/usr/src/paperless/export:rw |
| 91 | - /volume1/paperless/consume:/usr/src/paperless/consume:rw |
| 92 | - /volume1/paperless/trash:/usr/src/paperless/trash:rw |
| 93 | - /volume1/paperless/hooks:/usr/src/paperless/scripts |
| 94 | environment: |
| 95 | PAPERLESS_REDIS: redis://:redispass@paper-redis:6379 |
| 96 | |
| 97 | PAPERLESS_DBENGINE: mariadb # Set mariadb as dbengine |
| 98 | |
| 99 | PAPERLESS_DBHOST: 192.168.XXX.XXX # IP address of the Synology NAS |
| 100 | PAPERLESS_DBNAME: paperless # you must setup this Database before install this Docker-Compose |
| 101 | PAPERLESS_DBUSER: paperless # This user must Grant all permissions to the Database 'paperless' |
| 102 | PAPERLESS_DBPASS: yourPassword # Set your password for the Database 'paperless' |
| 103 | |
| 104 | |
| 105 | PAPERLESS_URL: https://paperlessngx. |
| 106 | PAPERLESS_CSRF_TRUSTED_ORIGINS: https://paperlessngx.hphds918.synology.me |
| 107 | PAPERLESS_FILENAME_FORMAT: YOUR FILENAME FORMAT # e. g. '{created_year}/{document_type}/{correspondent}/{title}' |
| 108 | PAPERLESS_SECRET_KEY: YOUR SECRETE # e. g. 'Aig!2?zy' |
| 109 | PAPERLESS_OCR_LANGUAGE: YOURLANGUAGE # e. g. 'deu' |
| 110 | PAPERLESS_TIME_ZONE: YOUR-TIME-ZONE # e. g. 'Europe/Berlin' |
| 111 | PAPERLESS_ADMIN_USER: YOUR-ADMIN-USERNAME # e. g. 'jean' |
| 112 | PAPERLESS_ADMIN_PASSWORD: YOUR-ADMIN-PASSWORD # e.g. '?urshn!' |
| 113 | USERMAP_UID: 1026 # Your UserMap UID |
| 114 | USERMAP_GID: 100 # Your UserMap GID |
| 115 | |
| 116 | PAPERLESS_TASK_WORKERS: 2 # Number of Task Workers |
| 117 | |
| 118 | PAPERLESS_TIKA_ENABLED: 1 |
| 119 | PAPERLESS_TIKA_GOTENBERG_ENDPOINT: http://gotenberg:3000 |
| 120 | PAPERLESS_TIKA_ENDPOINT: http://tika:9998 |
| 121 | |
| 122 | # write here the own Domain after localhost, when using a Proxy-Host, otherwise delete this environment-variable. |
| 123 | # PAPERLESS_ALLOWED_HOSTS: "localhost, paperlessngx.hphds918.synology.me" |
| 124 | |
| 125 | PAPERLESS_CONSUMER_ENABLE_BARCODES: true # If you would read Barcodes |
| 126 | PAPERLESS_CONSUMER_ENABLE_ASN_BARCODE: true # If you would like QR-ASN-Codes |
| 127 | PAPERLESS_CONSUMER_BARCODE_SCANNER: ZXING ' ZXING as Scanner |
| 128 | restart: on-failure:5 |
| 129 | |
| 130 | depends_on: |
| 131 | redis: |
| 132 | condition: service_started |
| 133 | |
| 134 | tika: |
| 135 | condition: service_started |
| 136 | |
| 137 | gotenberg: |
| 138 | condition: service_started |