From 1576d481695231da71060216f755e16c664dafcc Mon Sep 17 00:00:00 2001 From: "stephane.david" Date: Wed, 25 Dec 2024 15:33:16 +0100 Subject: [PATCH] Initial version --- .idea/.gitignore | 3 ++ .idea/misc.xml | 6 +++ .idea/modules.xml | 8 +++ .idea/paperless.iml | 9 ++++ .idea/vcs.xml | 6 +++ docker-compose.yml | 120 ++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 152 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/paperless.iml create mode 100644 .idea/vcs.xml create mode 100644 docker-compose.yml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..639900d --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..2f30c86 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/paperless.iml b/.idea/paperless.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/.idea/paperless.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..1c8bae6 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,120 @@ +services: + redis: + image: redis:7 + command: + - /bin/sh + - -c + - redis-server --requirepass redispass + container_name: PaperlessNGX-REDIS + hostname: paper-redis + mem_limit: 512m + mem_reservation: 256m + cpu_shares: 768 + security_opt: + - no-new-privileges:true + read_only: true + user: 1026:100 + healthcheck: + test: ["CMD-SHELL", "redis-cli ping || exit 1"] + volumes: + - /volume1/docker/paperlessngx/redis:/data:rw + environment: + TZ: Europe/Bucharest + restart: on-failure:5 + + db: + image: postgres:17 + container_name: PaperlessNGX-DB + hostname: paper-db + mem_limit: 1g + cpu_shares: 768 + security_opt: + - no-new-privileges:true + healthcheck: + test: ["CMD", "pg_isready", "-q", "-d", "paperless", "-U", "paperlessuser"] + timeout: 45s + interval: 10s + retries: 10 + volumes: + - /volume1/docker/paperlessngx/db:/var/lib/postgresql/data:rw + environment: + POSTGRES_DB: paperless + POSTGRES_USER: paperlessuser + POSTGRES_PASSWORD: paperlesspass + restart: on-failure:5 + + gotenberg: + image: gotenberg/gotenberg:latest + container_name: PaperlessNGX-GOTENBERG + hostname: gotenberg + security_opt: + - no-new-privileges:true + user: 1026:100 + command: + - "gotenberg" + - "--chromium-disable-javascript=true" + - "--chromium-allow-list=file:///tmp/.*" + restart: on-failure:5 + + tika: + image: ghcr.io/paperless-ngx/tika:latest + container_name: PaperlessNGX-TIKA + hostname: tika + security_opt: + - no-new-privileges:true + user: 1026:100 + restart: on-failure:5 + + paperless: + image: ghcr.io/paperless-ngx/paperless-ngx:latest + container_name: PaperlessNGX + hostname: paperless-ngx + mem_limit: 6g + cpu_shares: 1024 + security_opt: + - no-new-privileges:true + healthcheck: + test: ["CMD", "curl", "-fs", "-S", "--max-time", "2", "http://localhost:8000"] + interval: 30s + timeout: 10s + retries: 5 + ports: + - 8777:8000 + volumes: + - /volume1/docker/paperlessngx/data:/usr/src/paperless/data:rw + - /volume1/docker/paperlessngx/media:/usr/src/paperless/media:rw + - /volume1/docker/paperlessngx/export:/usr/src/paperless/export:rw + - /volume1/docker/paperlessngx/consume:/usr/src/paperless/consume:rw + - /volume1/docker/paperlessngx/trash:/usr/src/paperless/trash:rw + environment: + PAPERLESS_REDIS: redis://:redispass@paper-redis:6379 + PAPERLESS_DBENGINE: postgresql + PAPERLESS_DBHOST: paper-db + PAPERLESS_DBNAME: paperless + PAPERLESS_DBUSER: paperlessuser + PAPERLESS_DBPASS: paperlesspass + PAPERLESS_EMPTY_TRASH_DIR: ../trash + PAPERLESS_FILENAME_FORMAT: '{{ created_year }}/{{ correspondent }}/{{ document_type }}/{{ title }}' + PAPERLESS_OCR_ROTATE_PAGES_THRESHOLD: 6 + PAPERLESS_TASK_WORKERS: 1 + USERMAP_UID: 1026 + USERMAP_GID: 100 + PAPERLESS_TIME_ZONE: Europe/Bucharest + PAPERLESS_ADMIN_USER: marius + PAPERLESS_ADMIN_PASSWORD: mariushosting + PAPERLESS_URL: https://paperlessngx.yourname.synology.me + PAPERLESS_CSRF_TRUSTED_ORIGINS: https://paperlessngx.yourname.synology.me + PAPERLESS_OCR_LANGUAGE: deu+eng + PAPERLESS_TIKA_ENABLED: 1 + PAPERLESS_TIKA_GOTENBERG_ENDPOINT: http://gotenberg:3000 + PAPERLESS_TIKA_ENDPOINT: http://tika:9998 + restart: on-failure:5 + depends_on: + db: + condition: service_healthy + redis: + condition: service_healthy + tika: + condition: service_started + gotenberg: + condition: service_started \ No newline at end of file