116 lines
3.7 KiB
YAML
116 lines
3.7 KiB
YAML
# Docker Compose file for running paperless from the Docker Hub.
|
|
# This file contains everything paperless needs to run.
|
|
# Paperless supports amd64, arm and arm64 hardware.
|
|
#
|
|
# All compose files of paperless configure paperless in the following way:
|
|
#
|
|
# - Paperless is (re)started on system boot, if it was running before shutdown.
|
|
# - Docker volumes for storing data are managed by Docker.
|
|
# - Folders for importing and exporting files are created in the same directory
|
|
# as this file and mounted to the correct folders inside the container.
|
|
# - Paperless listens on port 8000.
|
|
#
|
|
# SQLite is used as the database. The SQLite file is stored in the data volume.
|
|
#
|
|
# To install and update paperless with this file, do the following:
|
|
#
|
|
# - Copy this file as 'docker-compose.yml' and the files 'docker-compose.env'
|
|
# and '.env' into a folder.
|
|
# - Run 'docker compose pull'.
|
|
# - Run 'docker compose run --rm webserver createsuperuser' to create a user.
|
|
# - use anything (secure) for username:pw
|
|
# - Run 'docker compose up -d'.
|
|
#
|
|
# For more extensive installation and update instructions, refer to the
|
|
# documentation.
|
|
|
|
services:
|
|
paperless:
|
|
container_name: paperless
|
|
image: ghcr.io/paperless-ngx/paperless-ngx:latest
|
|
restart: unless-stopped
|
|
networks:
|
|
- frontend
|
|
- backend
|
|
ports:
|
|
- 8000:8000
|
|
env_file: docker-compose.env
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
depends_on:
|
|
- paperless-redis
|
|
- paperless-postgres
|
|
volumes:
|
|
- data:/usr/src/paperless/data # container data
|
|
- /home/marty/documents/archive/.media:/usr/src/paperless/media # document location
|
|
- export:/usr/src/paperless/export # backup location
|
|
- /home/marty/documents/archive/consume:/usr/src/paperless/consume # watch folder
|
|
environment:
|
|
# - "PAPERLESS_TIME_ZONE=$TZ"
|
|
- "PAPERLESS_TIME_ZONE=Europe/Berlin"
|
|
- "PAPERLESS_OCR_LANGUAGE=deu+eng" # the default ocr language
|
|
- "PAPERLESS_OCR_LANGUAGES=eng deu frk" # ALL ocr languages to install
|
|
- "PAPERLESS_OCR_SKIP_ARCHIVE_FILE=with_text"
|
|
- "PAPERLESS_ENABLE_UPDATE_CHECK=true"
|
|
- "PAPERLESS_REDIS=redis://paperless-redis:6379"
|
|
- "PAPERLESS_DBHOST=paperless-postgres"
|
|
- "PAPERLESS_DBNAME=paperlessdb"
|
|
- "PAPERLESS_DBUSER=paperlessdbuser"
|
|
- "PAPERLESS_DBPASS=paperlessdbpassword"
|
|
- "PAPERLESS_SECRET_KEY=Mysupersecretpaperless(ngx)key"
|
|
- "PAPERLESS_FILENAME_FORMAT={{created_year}}/{{correspondent}}/{{created}}_{{title}}"
|
|
# Set the following two for your first launch
|
|
# and change the admin password afterwards.
|
|
# Once setup, you can safely remove these variables.
|
|
- "PAPERLESS_ADMIN_USER=ADMINUSERNAME"
|
|
- "PAPERLESS_ADMIN_PASSWORD=ADMINPASSWORD"
|
|
|
|
paperless-postgres:
|
|
container_name: paperless-postgres
|
|
image: postgres:16.0-alpine #fixedVersion
|
|
restart: unless-stopped
|
|
networks:
|
|
- backend
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
environment:
|
|
POSTGRES_USER: paperlessdbuser
|
|
POSTGRES_DB: paperlessdb
|
|
POSTGRES_PASSWORD: paperlessdbpassword
|
|
|
|
paperless-redis:
|
|
container_name: paperless-redis
|
|
image: redis:7.2-alpine #fixedVersion
|
|
restart: unless-stopped
|
|
networks:
|
|
- backend
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
volumes:
|
|
- redis-data:/data
|
|
environment:
|
|
REDIS_ARGS: "--save 60 10"
|
|
|
|
volumes:
|
|
data:
|
|
export:
|
|
#media:
|
|
postgres-data:
|
|
redis-data:
|
|
|
|
networks:
|
|
frontend:
|
|
name: frontend
|
|
driver: bridge
|
|
backend:
|
|
name: backend
|
|
driver: bridge
|
|
|
|
# secrets:
|
|
# paperless_db_paperless_passwd:
|
|
# file: ./secrets/paperless_db_paperless_passwd
|
|
# paperless_secret_key:
|
|
# file: ./secrets/paperless_secret_key
|
|
#
|