| @@ -0,0 +1,72 @@ | |||
| 1 | + | # The UID and GID of the user used to run paperless in the container. Set this | |
| 2 | + | # to your UID and GID on the host so that you have write access to the | |
| 3 | + | # consumption directory. | |
| 4 | + | USERMAP_UID=1001 | |
| 5 | + | USERMAP_GID=1001 | |
| 6 | + | ||
| 7 | + | # Database credentials | |
| 8 | + | POSTGRES_DB=paperless | |
| 9 | + | POSTGRES_USER=paperless | |
| 10 | + | POSTGRES_PASSWORD=paperless | |
| 11 | + | ||
| 12 | + | PAPERLESS_DBHOST=paperless-ngx-db | |
| 13 | + | PAPERLESS_DBNAME=$POSTGRES_DB | |
| 14 | + | PAPERLESS_DBUSER=$POSTGRES_USER | |
| 15 | + | PAPERLESS_DBPASS=$POSTGRES_PASSWORD | |
| 16 | + | ||
| 17 | + | # Additional languages to install for text recognition, separated by a | |
| 18 | + | # whitespace. Note that this is | |
| 19 | + | # different from PAPERLESS_OCR_LANGUAGE (default=eng), which defines the | |
| 20 | + | # language used for OCR. | |
| 21 | + | # The container installs English, German, Italian, Spanish and French by | |
| 22 | + | # default. | |
| 23 | + | # See https://packages.debian.org/search?keywords=tesseract-ocr-&searchon=names&suite=buster | |
| 24 | + | # for available languages. | |
| 25 | + | PAPERLESS_OCR_LANGUAGES=deu fra eng nld | |
| 26 | + | ||
| 27 | + | ############################################################################### | |
| 28 | + | # Paperless-specific settings # | |
| 29 | + | ############################################################################### | |
| 30 | + | ||
| 31 | + | # All settings defined in the paperless.conf.example can be used here. The | |
| 32 | + | # Docker setup does not use the configuration file. | |
| 33 | + | # A few commonly adjusted settings are provided below. | |
| 34 | + | ||
| 35 | + | # This is required if you will be exposing Paperless-ngx on a public domain | |
| 36 | + | # (if doing so please consider security measures such as reverse proxy) | |
| 37 | + | PAPERLESS_URL=https://paperless.domain.tld | |
| 38 | + | # Adjust this key if you plan to make paperless available publicly. It should | |
| 39 | + | # be a very long sequence of random characters. You don't need to remember it. | |
| 40 | + | PAPERLESS_SECRET_KEY=GENERATEME | |
| 41 | + | ||
| 42 | + | # Use this variable to set a timezone for the Paperless Docker containers. If not specified, defaults to UTC. | |
| 43 | + | PAPERLESS_TIME_ZONE=Europe/Berlin | |
| 44 | + | ||
| 45 | + | # The default language to use for OCR. Set this to the language most of your | |
| 46 | + | # documents are written in. | |
| 47 | + | PAPERLESS_OCR_LANGUAGE=deu | |
| 48 | + | ||
| 49 | + | # Set if accessing paperless via a domain subpath e.g. https://domain.com/PATHPREFIX and using a reverse-proxy like traefik or nginx | |
| 50 | + | #PAPERLESS_FORCE_SCRIPT_NAME=/PATHPREFIX | |
| 51 | + | #PAPERLESS_STATIC_URL=/PATHPREFIX/static/ # trailing slash required | |
| 52 | + | ||
| 53 | + | PAPERLESS_CONSUMER_ENABLE_BARCODES=true | |
| 54 | + | ||
| 55 | + | PAPERLESS_OCR_USER_ARGS= '{"continue_on_soft_render_error": true, "invalidate_digital_signatures": true}' | |
| 56 | + | ||
| 57 | + | PAPERLESS_USE_X_FORWARD_HOST=true | |
| 58 | + | PAPERLESS_CONSUMER_POLLING=10 | |
| 59 | + | PAPERLESS_CONSUMER_POLLING_RETRY_COUNT=5 | |
| 60 | + | PAPERLESS_CONSUMER_POLLING_DELAY=20 | |
| 61 | + | ||
| 62 | + | PAPERLESS_ADMIN_USER=MyAmazingAdmin | |
| 63 | + | PAPERLESS_ADMIN_MAIL=alias@domain.tld | |
| 64 | + | PAPERLESS_ADMIN_PASSWORD="SuperSecure!" | |
| 65 | + | ||
| 66 | + | PAPERLESS_EMAIL_HOST=mail.domain.tld | |
| 67 | + | PAPERLESS_EMAIL_PORT=587 | |
| 68 | + | PAPERLESS_EMAIL_HOST_USER=paperless@domain.tld | |
| 69 | + | PAPERLESS_EMAIL_HOST_PASSWORD="SuperSecureToo!" | |
| 70 | + | PAPERLESS_EMAIL_USE_TLS=false | |
| 71 | + | PAPERLESS_EMAIL_USE_SSL=true | |
| 72 | + | ||
MrGeneration / Backup Paperless NGX with restic
Last active 3 months ago
As shown on https://youtu.be/P-Pr7Dy6mP8
MrGeneration
revised this gist 10 months ago
·
a56f35e
5 files changed, 479 insertions, 1 deletion
| @@ -0,0 +1,16 @@ | |||
| 1 | + | Last change: 2025-09-25 Marcel Herrguth | |
| 2 | + | As shown on https://youtu.be/P-Pr7Dy6mP8 | |
| 3 | + | Attribution back to this GIST is required! | |
| 4 | + | ||
| 5 | + | Parts of this script are oriented from https://github.com/zammad/zammad/tree/develop/contrib/backup | |
| 6 | + | This script supports PostGreSQL (docker) stacks only and expects your media to be in a mounted folder. | |
| 7 | + | ||
| 8 | + | Restoration only works on a pre-installed Paperless NGX installation of the same version (or higher). | |
| 9 | + | During Restore, this script will remove the existing database and stop all relevant containers. | |
| 10 | + | Containers will be re-started after the restoration finished. | |
| 11 | + | ||
| 12 | + | COMMAND REFERENCE | |
| 13 | + | - backup: creates a new snapshot and backs up database and storage. | |
| 14 | + | - restore <snapshot>: Restore a given snapshot from your backup. If you omit the snapshot ID, latest will be used. | |
| 15 | + | - list_snapshots: List all available snapshot IDs. | |
| 16 | + | - verify_health <percentage>: Verify the health of your backup repository. If you omit percentage, 100% will be assumed. | |
| @@ -0,0 +1,104 @@ | |||
| 1 | + | services: | |
| 2 | + | paperless-ngx-broker: | |
| 3 | + | image: docker.io/library/redis:8.2-alpine | |
| 4 | + | container_name: paperless-ngx-broker | |
| 5 | + | hostname: paperless-ngx-broker | |
| 6 | + | restart: always | |
| 7 | + | networks: | |
| 8 | + | - paperless-ngx | |
| 9 | + | volumes: | |
| 10 | + | - ./data/redis:/data | |
| 11 | + | ||
| 12 | + | paperless-ngx-db: | |
| 13 | + | image: docker.io/library/postgres:17-alpine | |
| 14 | + | container_name: paperless-ngx-db | |
| 15 | + | hostname: paperless-ngx-db | |
| 16 | + | restart: always | |
| 17 | + | networks: | |
| 18 | + | - paperless-ngx | |
| 19 | + | volumes: | |
| 20 | + | - ./pg:/var/lib/postgresql/data | |
| 21 | + | ||
| 22 | + | paperless-ngx-webserver: | |
| 23 | + | image: ghcr.io/paperless-ngx/paperless-ngx:2.18.2 | |
| 24 | + | restart: always | |
| 25 | + | container_name: paperless-ngx-webserver | |
| 26 | + | hostname: paperless-ngx-webserver | |
| 27 | + | depends_on: | |
| 28 | + | - paperless-ngx-db | |
| 29 | + | - paperless-ngx-broker | |
| 30 | + | - paperless-ngx-gotenberg | |
| 31 | + | - paperless-ngx-tika | |
| 32 | + | networks: | |
| 33 | + | - paperless-ngx | |
| 34 | + | - external_network | |
| 35 | + | volumes: | |
| 36 | + | - ./data/paperless:/usr/src/paperless/data | |
| 37 | + | - ./data/media:/usr/src/paperless/media | |
| 38 | + | - ./volume/_consume:/usr/src/paperless/consume:z | |
| 39 | + | - ./volume/_export:/usr/src/paperless/export:z | |
| 40 | + | ports: | |
| 41 | + | - "127.0.0.1:8000:8000" | |
| 42 | + | env_file: .env | |
| 43 | + | environment: | |
| 44 | + | PAPERLESS_REDIS: redis://paperless-ngx-broker:6379 | |
| 45 | + | PAPERLESS_TIKA_ENABLED: 1 | |
| 46 | + | PAPERLESS_TIKA_GOTENBERG_ENDPOINT: http://paperless-ngx-gotenberg:3000 | |
| 47 | + | PAPERLESS_TIKA_ENDPOINT: http://paperless-ngx-tika:9998 | |
| 48 | + | ||
| 49 | + | paperless-ngx-gotenberg: | |
| 50 | + | image: docker.io/gotenberg/gotenberg:8.22 | |
| 51 | + | restart: always | |
| 52 | + | networks: | |
| 53 | + | - paperless-ngx | |
| 54 | + | container_name: paperless-ngx-gotenberg | |
| 55 | + | hostname: paperless-ngx-gotenberg | |
| 56 | + | ||
| 57 | + | # The gotenberg chromium route is used to convert .eml files. We do not | |
| 58 | + | # want to allow external content like tracking pixels or even javascript. | |
| 59 | + | # environment: | |
| 60 | + | # CHROMIUM_DISABLE_ROUTES: 1 | |
| 61 | + | command: | |
| 62 | + | - 'gotenberg' | |
| 63 | + | - "--chromium-disable-javascript=true" | |
| 64 | + | - "--chromium-allow-list=file:///tmp/.*" | |
| 65 | + | # - "--chromium-disable-routes=true" | |
| 66 | + | # - "--chromium-restart-after=5" | |
| 67 | + | # - "--chromium-auto-start=true" | |
| 68 | + | # - "--chromium-ignore-certificate-errors=true" | |
| 69 | + | # - "--chromium-disable-web-security=true" | |
| 70 | + | # - '--chromium-allow-insecure-localhost=true' | |
| 71 | + | # - "--chromium-start-timeout=30s" | |
| 72 | + | # - "--uno-listener-start-timeout=180s" | |
| 73 | + | # - "--libreoffice-disable-routes=false" | |
| 74 | + | # - "--libreoffice-auto-start=true" | |
| 75 | + | # - "--libreoffice-restart-after=5" | |
| 76 | + | # - '--libreoffice-start-timeout=30s' | |
| 77 | + | # - '--api-timeout=3000s' | |
| 78 | + | ||
| 79 | + | ||
| 80 | + | paperless-ngx-tika: | |
| 81 | + | image: ghcr.io/paperless-ngx/tika:2.9.1-full | |
| 82 | + | container_name: paperless-ngx-tika | |
| 83 | + | hostname: paperless-ngx-tika | |
| 84 | + | restart: always | |
| 85 | + | networks: | |
| 86 | + | - paperless-ngx | |
| 87 | + | ||
| 88 | + | networks: | |
| 89 | + | paperless-ngx: | |
| 90 | + | name: paperless-ngx | |
| 91 | + | internal: true | |
| 92 | + | external_network: | |
| 93 | + | enable_ipv6: true | |
| 94 | + | ipam: | |
| 95 | + | config: | |
| 96 | + | - subnet: fd63:e614:1cf8:fb00::2:0/112 | |
| 97 | + | ||
| 98 | + | # volumes: | |
| 99 | + | # consume: | |
| 100 | + | # driver: local | |
| 101 | + | # driver_opts: | |
| 102 | + | # type: nfs | |
| 103 | + | # o: addr=yamato.tha.vpn,nfsvers=4.1,nolock,soft,rw,async | |
| 104 | + | # device: :/volume1/import/_consume | |
| @@ -1 +0,0 @@ | |||
| 1 | - | TODO | |
Diff is too large to be shown
MrGeneration
revised this gist 11 months ago
·
c915917
1 file changed, 1 insertion
| @@ -0,0 +1 @@ | |||
| 1 | + | TODO | |