111 lines
3.9 KiB
Django/Jinja
111 lines
3.9 KiB
Django/Jinja
# 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:
|
|
- caddy
|
|
- backend
|
|
ports:
|
|
- 8000:8000
|
|
env_file: docker-compose.env
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
depends_on:
|
|
- paperless-redis
|
|
- paperless-postgres
|
|
volumes:
|
|
- "{{ stack_paperless_env_dir }}/data/paperless:/usr/src/paperless/data" # container data
|
|
- "{{ stack_paperless_env_dir }}/data/paperless_export:/usr/src/paperless/export" # backup location
|
|
- "{{ stack_paperless_serve_dir }}/documents:/usr/src/paperless/media" # document location
|
|
- "{{ stack_paperless_serve_dir }}/consume:/usr/src/paperless/consume" # watch folder
|
|
environment:
|
|
- "PAPERLESS_TIME_ZONE={{ stack_paperless_tz }}"
|
|
- "USERMAP_UID={{ stack_paperless_puid }}"
|
|
- "USERMAP_GID={{ stack_paperless_pgid }}"
|
|
- "PAPERLESS_OCR_LANGUAGE={{ stack_paperless_ocr_language }}"
|
|
- "PAPERLESS_OCR_LANGUAGES={{ stack_paperless_ocr_languages }}"
|
|
- "PAPERLESS_OCR_SKIP_ARCHIVE_FILE={{ stack_paperless_ocr_skip_archive_file }}"
|
|
- "PAPERLESS_ENABLE_UPDATE_CHECK={{ stack_paperless_enable_update_check }}"
|
|
- "PAPERLESS_REDIS=redis://paperless-redis:6379"
|
|
- "PAPERLESS_DBHOST=paperless-postgres"
|
|
- "PAPERLESS_DBNAME={{ stack_paperless_dbname }}"
|
|
- "PAPERLESS_DBUSER={{ stack_paperless_dbuser }}"
|
|
- "PAPERLESS_DBPASS={{ stack_paperless_dbpass }}"
|
|
- "PAPERLESS_SECRET_KEY={{ stack_paperless_secret_key }}"
|
|
- "PAPERLESS_FILENAME_FORMAT={{ stack_paperless_filename_format }}"
|
|
- "PAPERLESS_ADMIN_USER={{ stack_paperless_admin_user }}"
|
|
- "PAPERLESS_ADMIN_PASSWORD={{ stack_paperless_admin_password }}"
|
|
|
|
paperless-postgres:
|
|
container_name: paperless-postgres
|
|
image: postgres:16.0-alpine #fixedVersion
|
|
restart: unless-stopped
|
|
networks:
|
|
- backend
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
volumes:
|
|
- "{{ stack_paperless_env_dir }}/data/postgres:/var/lib/postgresql/data"
|
|
environment:
|
|
POSTGRES_DB: "{{ stack_paperless_dbname }}"
|
|
POSTGRES_USER: "{{ stack_paperless_dbuser }}"
|
|
POSTGRES_PASSWORD: "{{ stack_paperless_dbpass }}"
|
|
|
|
paperless-redis:
|
|
container_name: paperless-redis
|
|
image: redis:7.2-alpine #fixedVersion
|
|
restart: unless-stopped
|
|
networks:
|
|
- backend
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
volumes:
|
|
- "{{ stack_paperless_env_dir }}/data/redis:/data"
|
|
environment:
|
|
REDIS_ARGS: "--save 60 10"
|
|
|
|
volumes:
|
|
data:
|
|
export:
|
|
#media:
|
|
|
|
networks:
|
|
caddy:
|
|
external: true
|
|
backend:
|
|
name: backend
|
|
driver: bridge
|
|
|
|
# secrets:
|
|
# paperless_db_paperless_passwd:
|
|
# file: ./secrets/paperless_db_paperless_passwd
|
|
# paperless_secret_key:
|
|
# file: ./secrets/paperless_secret_key
|
|
#
|