Created
April 18, 2024 08:16
-
-
Save jamct/09514496da6263114b7ee4cd264ed8f7 to your computer and use it in GitHub Desktop.
Docker-Compose for Paperless-ngx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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=1028 | |
USERMAP_GID=100 | |
# 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&suite=buster | |
# for available languages. | |
PAPERLESS_OCR_LANGUAGES=deu | |
############################################################################### | |
# Paperless-specific settings | |
############################################################################### | |
# All settings defined in the paperless.conf.example can be used here. The | |
# Docker setup does not use the configuration file. | |
# 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.example.com | |
# Adjust this key if you plan to make paperless available publicly. It should | |
# be a very long sequence of random characters. You don't need to remember it. | |
PAPERLESS_SECRET_KEY=123456789087654321_bitte_aendern! | |
# Use this variable to set a timezone for the Paperless Docker containers. If not specified, defaults to UTC. | |
PAPERLESS_TIME_ZONE=Europe/Berlin | |
# The default language to use for OCR. Set this to the language most of your | |
# documents are written in. | |
PAPERLESS_OCR_LANGUAGE=deu | |
# Set if accessing paperless via a domain subpath e.g. https://domain.com/PATHPREFIX and using a reverse-proxy like traefik or nginx | |
#PAPERLESS_FORCE_SCRIPT_NAME=/PATHPREFIX | |
#PAPERLESS_STATIC_URL=/PATHPREFIX/static/ # trailing slash required | |
#PAPERLESS_CONSUMER_POLLING=30 | |
PAPERLESS_CONSUMER_ASN_BARCODE_PREFIX=ASN | |
PAPERLESS_CONSUMER_ENABLE_ASN_BARCODE=true | |
PAPERLESS_CONSUMER_ENABLE_BARCODES=true | |
PAPERLESS_CONSUMER_BARCODE_SCANNER=ZXING |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.8" | |
services: | |
broker: | |
image: docker.io/library/redis:7 | |
restart: unless-stopped | |
volumes: | |
- ./volumes/redis:/data | |
db: | |
image: docker.io/library/mariadb:10 | |
restart: unless-stopped | |
volumes: | |
- ./volumes/database:/var/lib/mysql | |
environment: | |
MARIADB_HOST: paperless | |
MARIADB_DATABASE: paperless | |
MARIADB_USER: paperless | |
MARIADB_PASSWORD: paperless | |
MARIADB_ROOT_PASSWORD: paperless | |
webserver: | |
image: ghcr.io/paperless-ngx/paperless-ngx:latest | |
restart: unless-stopped | |
depends_on: | |
- db | |
- broker | |
ports: | |
- "8000:8000" | |
volumes: | |
- ./volumes/data:/usr/src/paperless/data | |
- ./volumes/media:/usr/src/paperless/media | |
- ./volumes/export:/usr/src/paperless/export | |
- ./incoming:/usr/src/paperless/consume | |
env_file: docker-compose.env | |
environment: | |
PAPERLESS_REDIS: redis://broker:6379 | |
PAPERLESS_DBENGINE: mariadb | |
PAPERLESS_DBHOST: db | |
PAPERLESS_DBUSER: paperless | |
PAPERLESS_DBPASS: paperless | |
PAPERLESS_DBPORT: 3306 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This does not work on a Synology NAS with DSM 7.2.1-69057 Update 5 because the initialization of MariaDB fails due to permissions, see the log below:
After
docker-compose up -d
the directoryvolumes/database
has a new owner and group - owner with userid 999, and group synopkgs:And a minor comment: the "./incoming" directory does not exist if one follows the instruction of the c't article. It should be changed to the real location of the "consume" folder on the host system.