services:
broker:
container_name: paperlessngx-redis
network_mode: bridge
image: docker.io/library/redis:latest
volumes:
- /volume1/docker/paperlessngx/redis:/redis
restart: unless-stopped
db:
container_name: paperlessngx-db
network_mode: bridge
image: docker.io/library/postgres:15.3
restart: unless-stopped
volumes:
- /volume1/docker/paperlessngx/db:/var/lib/postgresql/data
environment:
POSTGRES_DB: paperlessngx
POSTGRES_USER: paperlessngx
POSTGRES_PASSWORD: xxxpasswordxxx
webserver:
container_name: paperlessngx
network_mode: bridge
image: ghcr.io/paperless-ngx/paperless-ngx:latest
restart: unless-stopped
depends_on:
- db
- broker
- gotenberg
- tika
ports:
- 8000:8000
healthcheck:
test: ["CMD", "curl", "-fs", "-S", "--max-time", "2", "
http://localhost:8000"]
interval: 30s
timeout: 10s
retries: 5
volumes:
- /volume1/docker/paperlessngx/data:/usr/src/paperless/data
- /volume1/docker/paperlessngx/media:/usr/src/paperless/media
- /volume1/docker/paperlessngx/export:/usr/src/paperless/export
- /volume1/docker/paperlessngx/scaninput:/usr/src/paperless/consume
environment:
PAPERLESS_REDIS: redis://broker:6379
PAPERLESS_DBHOST: db
PAPERLESS_DBNAME: paperlessngx
PAPERLESS_DBUSER: paperlessngx
PAPERLESS_DBPASS: xxxpasswordxxx
PAPERLESS_TIKA_ENABLED: 1
PAPERLESS_TIKA_ENDPOINT:
http://tika:9998
PAPERLESS_TIKA_GOTENBERG_ENDPOINT:
http://gotenberg:3000/forms/libreoffice/convert#
USERMAP_UID: 4242539651
USERMAP_GID: 4242539009
PAPERLESS_OCR_LANGUAGES: deu eng
PAPERLESS_OCR_LANGUAGE: deu
PAPERLESS_TIME_ZONE: Europe/Berlin
PAPERLESS_FILENAME_FORMAT: '{created_year}/{correspondent}/{title}'
PAPERLESS_ADMIN_USER: plngxadmin
PAPERLESS_ADMIN_PASSWORD: yyypsswordyyy
PAPERLESS_ADMIN_MAIL:
email@domain.tld
db-backup:
container_name: paperless-db-backup
network_mode: bridge
image: docker.io/library/postgres:15.3
volumes:
- /volume1/docker/paperlessngx/db-backup:/dump
- /etc/localtime:/etc/localtime:ro
environment:
PGHOST: db
PGDATABASE: paperlessngx
PGUSER: paperlessngx
PGPASSWORD: xxxpasswordxxx
BACKUP_NUM_KEEP: 10
BACKUP_FREQUENCY: 7d
entrypoint: |
bash -c 'bash -s <<EOF
trap "break;exit" SIGHUP SIGINT SIGTERM
sleep 2m
while /bin/true; do
pg_dump -Fc > /dump/dump_\`date +%d-%m-%Y"_"%H_%M_%S\`.psql
(ls -t /dump/dump*.psql|head -n $$BACKUP_NUM_KEEP;ls /dump/dump*.psql)|sort|uniq -u|xargs rm -- {}
sleep $$BACKUP_FREQUENCY
done
EOF'
gotenberg:
container_name: paperlessngx-gotenberg
network_mode: bridge
image: docker.io/gotenberg/gotenberg:latest
restart: unless-stopped
environment:
CHROMIUM_DISABLE_ROUTES: 1
command:
- 'gotenberg'
- '--chromium-disable-javascript=true'
- '--chromium-allow-list=file:///tmp/.*'
tika:
container_name: paperlessngx-tika
network_mode: bridge
image: ghcr.io/paperless-ngx/tika:latest
restart: unless-stopped