A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
update docker compose files and documentation #339
jonaswinkler769356733ad0
diff --git a/docker-compose.example.env b/docker-compose.example.envdeleted file mode 100644index e9e8ecb06..000000000--- a/docker-compose.example.env+++ /dev/null@@ -1,34 +0,0 @@-# 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=1000-#USERMAP_GID=1000--# 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=tur ces--###############################################################################-# 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.--# 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=change-me--# Use this variable to set a timezone for the Paperless Docker containers. If not specified, defaults to UTC.-#PAPERLESS_TIME_ZONE=America/Los_Angeles--# The default language to use for OCR. Set this to the language most of your-# documents are written in.-#PAPERLESS_OCR_LANGUAGE=engdiff --git a/docker-compose.postgres.yml b/docker-compose.postgres.ymldeleted file mode 100644index 53fea9e28..000000000--- a/docker-compose.postgres.yml+++ /dev/null@@ -1,44 +0,0 @@-version: "3.4"-services:- broker:- image: redis:6.0- restart: unless-stopped-- db:- image: postgres:13- restart: unless-stopped- volumes:- - pgdata:/var/lib/postgresql/data- environment:- POSTGRES_DB: paperless- POSTGRES_USER: paperless- POSTGRES_PASSWORD: paperless-- webserver:- build: .- restart: unless-stopped- depends_on:- - db- - broker- ports:- - 8000:8000- healthcheck:- test: ["CMD", "curl", "-f", "http://localhost:8000"]- interval: 30s- timeout: 10s- retries: 5- volumes:- - data:/usr/src/paperless/data- - media:/usr/src/paperless/media- - ./export:/usr/src/paperless/export- - ./consume:/usr/src/paperless/consume- env_file: docker-compose.env- environment:- PAPERLESS_REDIS: redis://broker:6379- PAPERLESS_DBHOST: db---volumes:- data:- media:- pgdata:diff --git a/docker-compose.sqlite-tika.yml b/docker-compose.sqlite-tika.ymldeleted file mode 100644index 5fbd6f224..000000000--- a/docker-compose.sqlite-tika.yml+++ /dev/null@@ -1,45 +0,0 @@-version: "3.4"-services:- broker:- image: redis:6.0- restart: unless-stopped-- webserver:- build: .- restart: unless-stopped- depends_on:- - broker- - gotenberg- - tika- ports:- - 8000:8000- healthcheck:- test: ["CMD", "curl", "-f", "http://localhost:8000"]- interval: 30s- timeout: 10s- retries: 5- volumes:- - data:/usr/src/paperless/data- - media:/usr/src/paperless/media- - ./export:/usr/src/paperless/export- - ./consume:/usr/src/paperless/consume- env_file: docker-compose.env- environment:- PAPERLESS_REDIS: redis://broker:6379- PAPERLESS_TIKA_ENABLED: 1- PAPERLESS_TIKA_GOTENBERG_ENDPOINT: http://gotenberg:3000- PAPERLESS_TIKA_ENDPOINT: http://tika:9998-- gotenberg:- image: thecodingmachine/gotenberg- restart: unless-stopped- environment:- DISABLE_GOOGLE_CHROME: 1-- tika:- image: apache/tika- restart: unless-stopped--volumes:- data:- media:diff --git a/docker-compose.sqlite.yml b/docker-compose.sqlite.ymldeleted file mode 100644index 87aa100a6..000000000--- a/docker-compose.sqlite.yml+++ /dev/null@@ -1,31 +0,0 @@-version: "3.4"-services:- broker:- image: redis:6.0- restart: unless-stopped-- webserver:- build: .- restart: unless-stopped- depends_on:- - broker- ports:- - 8000:8000- healthcheck:- test: ["CMD", "curl", "-f", "http://localhost:8000"]- interval: 30s- timeout: 10s- retries: 5- volumes:- - data:/usr/src/paperless/data- - media:/usr/src/paperless/media- - ./export:/usr/src/paperless/export- - ./consume:/usr/src/paperless/consume- env_file: docker-compose.env- environment:- PAPERLESS_REDIS: redis://broker:6379---volumes:- data:- media:diff --git a/docker/hub/.env b/docker/compose/.envsimilarity index 100%rename from docker/hub/.envrename to docker/compose/.envdiff --git a/docker/hub/docker-compose.env b/docker/compose/docker-compose.envsimilarity index 100%rename from docker/hub/docker-compose.envrename to docker/compose/docker-compose.envdiff --git a/docker/compose/docker-compose.postgres-tika.yml b/docker/compose/docker-compose.postgres-tika.ymlnew file mode 100644index 000000000..93fff4afc--- /dev/null+++ b/docker/compose/docker-compose.postgres-tika.yml@@ -0,0 +1,90 @@+# 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.+#+# In addition to that, this docker-compose file adds the following optional+# configurations:+#+# - Instead of SQLite (default), PostgreSQL is used as the database server.+# - Apache Tika and Gotenberg servers are started with paperless and paperless+# is configured to use these services. These provide support for consuming+# Office documents (Word, Excel, Power Point and their LibreOffice counter-+# parts.+#+# 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.+# - Run 'docker-compose up -d'.+#+# For more extensive installation and update instructions, refer to the+# documentation.++version: "3.4"+services:+ broker:+ image: redis:6.0+ restart: unless-stopped++ db:+ image: postgres:13+ restart: unless-stopped+ volumes:+ - pgdata:/var/lib/postgresql/data+ environment:+ POSTGRES_DB: paperless+ POSTGRES_USER: paperless+ POSTGRES_PASSWORD: paperless++ webserver:+ image: jonaswinkler/paperless-ng:latest+ restart: unless-stopped+ depends_on:+ - db+ - broker+ - gotenberg+ - tika+ ports:+ - 8000:8000+ healthcheck:+ test: ["CMD", "curl", "-f", "http://localhost:8000"]+ interval: 30s+ timeout: 10s+ retries: 5+ volumes:+ - data:/usr/src/paperless/data+ - media:/usr/src/paperless/media+ - ./export:/usr/src/paperless/export+ - ./consume:/usr/src/paperless/consume+ env_file: docker-compose.env+ environment:+ PAPERLESS_REDIS: redis://broker:6379+ PAPERLESS_DBHOST: db+ PAPERLESS_TIKA_ENABLED: 1+ PAPERLESS_TIKA_GOTENBERG_ENDPOINT: http://gotenberg:3000+ PAPERLESS_TIKA_ENDPOINT: http://tika:9998++ gotenberg:+ image: thecodingmachine/gotenberg+ restart: unless-stopped+ environment:+ DISABLE_GOOGLE_CHROME: 1++ tika:+ image: apache/tika+ restart: unless-stopped++volumes:+ data:+ media:+ pgdata:diff --git a/docker/compose/docker-compose.postgres.yml b/docker/compose/docker-compose.postgres.ymlnew file mode 100644index 000000000..da33b4c25--- /dev/null+++ b/docker/compose/docker-compose.postgres.yml@@ -0,0 +1,72 @@+# 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.+#+# In addition to that, this docker-compose file adds the following optional+# configurations:+#+# - Instead of SQLite (default), PostgreSQL is used as the database server.+#+# 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.+# - Run 'docker-compose up -d'.+#+# For more extensive installation and update instructions, refer to the+# documentation.++version: "3.4"+services:+ broker:+ image: redis:6.0+ restart: unless-stopped++ db:+ image: postgres:13+ restart: unless-stopped+ volumes:+ - pgdata:/var/lib/postgresql/data+ environment:+ POSTGRES_DB: paperless+ POSTGRES_USER: paperless+ POSTGRES_PASSWORD: paperless++ webserver:+ image: jonaswinkler/paperless-ng:latest+ restart: unless-stopped+ depends_on:+ - db+ - broker+ ports:+ - 8000:8000+ healthcheck:+ test: ["CMD", "curl", "-f", "http://localhost:8000"]+ interval: 30s+ timeout: 10s+ retries: 5+ volumes:+ - data:/usr/src/paperless/data+ - media:/usr/src/paperless/media+ - ./export:/usr/src/paperless/export+ - ./consume:/usr/src/paperless/consume+ env_file: docker-compose.env+ environment:+ PAPERLESS_REDIS: redis://broker:6379+ PAPERLESS_DBHOST: db+++volumes:+ data:+ media:+ pgdata:diff --git a/docker/compose/docker-compose.sqlite-tika.yml b/docker/compose/docker-compose.sqlite-tika.ymlnew file mode 100644index 000000000..5dfff0830--- /dev/null+++ b/docker/compose/docker-compose.sqlite-tika.yml@@ -0,0 +1,78 @@+# 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.+#+# In addition to that, this docker-compose file adds the following optional+# configurations:+#+# - Apache Tika and Gotenberg servers are started with paperless and paperless+# is configured to use these services. These provide support for consuming+# Office documents (Word, Excel, Power Point and their LibreOffice counter-+# parts.+#+# 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.+# - Run 'docker-compose up -d'.+#+# For more extensive installation and update instructions, refer to the+# documentation.++version: "3.4"+services:+ broker:+ image: redis:6.0+ restart: unless-stopped++ webserver:+ image: jonaswinkler/paperless-ng:latest+ restart: unless-stopped+ depends_on:+ - broker+ - gotenberg+ - tika+ ports:+ - 8000:8000+ healthcheck:+ test: ["CMD", "curl", "-f", "http://localhost:8000"]+ interval: 30s+ timeout: 10s+ retries: 5+ volumes:+ - data:/usr/src/paperless/data+ - media:/usr/src/paperless/media+ - ./export:/usr/src/paperless/export+ - ./consume:/usr/src/paperless/consume+ env_file: docker-compose.env+ environment:+ PAPERLESS_REDIS: redis://broker:6379+ PAPERLESS_TIKA_ENABLED: 1+ PAPERLESS_TIKA_GOTENBERG_ENDPOINT: http://gotenberg:3000+ PAPERLESS_TIKA_ENDPOINT: http://tika:9998++ gotenberg:+ image: thecodingmachine/gotenberg+ restart: unless-stopped+ environment:+ DISABLE_GOOGLE_CHROME: 1++ tika:+ image: apache/tika+ restart: unless-stopped++volumes:+ data:+ media:diff --git a/docker/compose/docker-compose.sqlite.yml b/docker/compose/docker-compose.sqlite.ymlnew file mode 100644index 000000000..f49e1d1e9--- /dev/null+++ b/docker/compose/docker-compose.sqlite.yml@@ -0,0 +1,56 @@+# 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.+# - Run 'docker-compose up -d'.+#+# For more extensive installation and update instructions, refer to the+# documentation.++version: "3.4"+services:+ broker:+ image: redis:6.0+ restart: unless-stopped++ webserver:+ image: jonaswinkler/paperless-ng:latest+ restart: unless-stopped+ depends_on:+ - broker+ ports:+ - 8000:8000+ healthcheck:+ test: ["CMD", "curl", "-f", "http://localhost:8000"]+ interval: 30s+ timeout: 10s+ retries: 5+ volumes:+ - data:/usr/src/paperless/data+ - media:/usr/src/paperless/media+ - ./export:/usr/src/paperless/export+ - ./consume:/usr/src/paperless/consume+ env_file: docker-compose.env+ environment:+ PAPERLESS_REDIS: redis://broker:6379+++volumes:+ data:+ media:diff --git a/docker/hub/docker-compose.postgres.yml b/docker/hub/docker-compose.postgres.ymldeleted file mode 100644index 863c99c32..000000000--- a/docker/hub/docker-compose.postgres.yml+++ /dev/null@@ -1,44 +0,0 @@-version: "3.4"-services:- broker:- image: redis:6.0- restart: unless-stopped-- db:- image: postgres:13- restart: unless-stopped- volumes:- - pgdata:/var/lib/postgresql/data- environment:- POSTGRES_DB: paperless- POSTGRES_USER: paperless- POSTGRES_PASSWORD: paperless-- webserver:- image: jonaswinkler/paperless-ng:latest- restart: unless-stopped- depends_on:- - db- - broker- ports:- - 8000:8000- healthcheck:- test: ["CMD", "curl", "-f", "http://localhost:8000"]- interval: 30s- timeout: 10s- retries: 5- volumes:- - data:/usr/src/paperless/data- - media:/usr/src/paperless/media- - ./export:/usr/src/paperless/export- - ./consume:/usr/src/paperless/consume- env_file: docker-compose.env- environment:- PAPERLESS_REDIS: redis://broker:6379- PAPERLESS_DBHOST: db---volumes:- data:- media:- pgdata:diff --git a/docker/hub/docker-compose.sqlite-tika.yml b/docker/hub/docker-compose.sqlite-tika.ymldeleted file mode 100644index 5928438fb..000000000--- a/docker/hub/docker-compose.sqlite-tika.yml+++ /dev/null@@ -1,45 +0,0 @@-version: "3.4"-services:- broker:- image: redis:6.0- restart: unless-stopped-- webserver:- image: jonaswinkler/paperless-ng:latest- restart: unless-stopped- depends_on:- - broker- - gotenberg- - tika- ports:- - 8000:8000- healthcheck:- test: ["CMD", "curl", "-f", "http://localhost:8000"]- interval: 30s- timeout: 10s- retries: 5- volumes:- - data:/usr/src/paperless/data- - media:/usr/src/paperless/media- - ./export:/usr/src/paperless/export- - ./consume:/usr/src/paperless/consume- env_file: docker-compose.env- environment:- PAPERLESS_REDIS: redis://broker:6379- PAPERLESS_TIKA_ENABLED: 1- PAPERLESS_TIKA_GOTENBERG_ENDPOINT: http://gotenberg:3000- PAPERLESS_TIKA_ENDPOINT: http://tika:9998-- gotenberg:- image: thecodingmachine/gotenberg- restart: unless-stopped- environment:- DISABLE_GOOGLE_CHROME: 1-- tika:- image: apache/tika- restart: unless-stopped--volumes:- data:- media:diff --git a/docker/hub/docker-compose.sqlite.yml b/docker/hub/docker-compose.sqlite.ymldeleted file mode 100644index 2ab0cbb9c..000000000--- a/docker/hub/docker-compose.sqlite.yml+++ /dev/null@@ -1,31 +0,0 @@-version: "3.4"-services:- broker:- image: redis:6.0- restart: unless-stopped-- webserver:- image: jonaswinkler/paperless-ng:latest- restart: unless-stopped- depends_on:- - broker- ports:- - 8000:8000- healthcheck:- test: ["CMD", "curl", "-f", "http://localhost:8000"]- interval: 30s- timeout: 10s- retries: 5- volumes:- - data:/usr/src/paperless/data- - media:/usr/src/paperless/media- - ./export:/usr/src/paperless/export- - ./consume:/usr/src/paperless/consume- env_file: docker-compose.env- environment:- PAPERLESS_REDIS: redis://broker:6379---volumes:- data:- media:diff --git a/docs/administration.rst b/docs/administration.rstindex 80f57d849..32741300a 100644--- a/docs/administration.rst+++ b/docs/administration.rst@@ -54,7 +54,7 @@ Updating Paperless##################If a new release of paperless-ng is available, upgrading depends on how you-installed paperless-ng in the first place. The releases are available at+installed paperless-ng in the first place. The releases are available at the`release page <https://github.com/jonaswinkler/paperless-ng/releases>`_.First of all, ensure that paperless is stopped.@@ -86,8 +86,8 @@ B. If you built the image yourself, do the following:$ docker-compose upRunning `docker-compose up` will also apply any new database migrations.-If you see everything working, you can start paperless-ng with "-d" to have it-run in the background.+If you see everything working, press CTRL+C once to gracefully stop paperless.+Then you can start paperless-ng with ``-d`` to have it run in the background.Updating paperless without docker=================================@@ -109,6 +109,9 @@ After grabbing the new release and unpacking the contents, do the following:This creates a new virtual environment (or uses your existing environment)and installs all dependencies into it.++ You can also use the included ``requirements.txt`` file instead and create the virtual+ environment yourself. This file includes exactly the same dependencies.3. Migrate the database.diff --git a/docs/changelog.rst b/docs/changelog.rstindex 78262cd98..29c899d40 100644--- a/docs/changelog.rst+++ b/docs/changelog.rst@@ -18,11 +18,12 @@ update paperless.* Changes to docker installations and updates- * The ``-dockerfiles.tar.xz`` release archive is gone. Instead, simply grab the dockerfiles from ``/docker/hub`` in the repository+ * The ``-dockerfiles.tar.xz`` release archive is gone. Instead, simply grab the docker files from ``/docker/compose`` in the repositoryif you wish to install paperless by pulling from the hub.- * The docker compose files in ``/docker/hub`` were changed to always use the ``latest`` version automatically. In order to do further- updated, simply do a ``docker-compose pull``. The documentation has been updated.+ * The docker compose files in ``/docker/compose`` were changed to always use the ``latest`` version automatically. In order to do further+ updates, simply do a ``docker-compose pull``. The documentation has been updated.* The docker compose files were changed to restart paperless on system boot only if it was running before shutdown.+ * Documentation of the docker-compose files about what they do.* Changes to bare metal installations and updatesdiff --git a/docs/setup.rst b/docs/setup.rstindex 90df55969..6eb597014 100644--- a/docs/setup.rst+++ b/docs/setup.rst@@ -97,9 +97,10 @@ run the above mentioned components yourself.Install Paperless from Docker Hub=================================-1. Go to the `/docker/hub directory on the project page <https://github.com/jonaswinkler/paperless-ng/tree/master/docker/hub>`_+1. Go to the `/docker/compose directory on the project page <https://github.com/jonaswinkler/paperless-ng/tree/master/docker/compose>`_and download one of the ``docker-compose.*.yml`` files, depending on which database backend youwant to use. Rename this file to `docker-compose.yml`.+ If you want to enable optional support for Office documents, download a file with ``-tika`` in its name.Download the ``docker-compose.env`` file and the ``.env`` file as well and store themin the same directory.@@ -197,13 +198,27 @@ Build the docker image yourselfThe master branch always reflects the latest stable version.-2. Copy one of the ``docker-compose.*.yml`` to ``docker-compose.yml``,+2. Copy one of the ``docker/compose/docker-compose.*.yml`` to ``docker-compose.yml`` in the root folder,depending on which database backend you want to use. Copy- ``docker-compose.env.example`` to ``docker-compose.env``.+ ``docker-compose.env`` into the project root as well.-3. Run the `compile-frontend.sh` script. This requires `node` and `npm`.+3. In the ``docker-compose.yml`` file, find the line that instructs docker-compose to pull the paperless image from Docker Hub:-4. Follow steps 2 to 7 of :ref:`setup-docker_hub`. When asked to run+ .. code:: yaml++ webserver:+ image: jonaswinkler/paperless-ng:latest++ and replace it with a line that instructs docker-compose to build the image from the current working directory instead:++ .. code:: yaml++ webserver:+ build: .++4. Run the ``compile-frontend.sh`` script. This requires ``node`` and ``npm >= v15``.++5. Follow steps 2 to 7 of :ref:`setup-docker_hub`. When asked to run``docker-compose up -d`` to start the containers, do.. code:: shell-session@@ -252,6 +267,7 @@ writing. Windows is not and will never be supported.On Raspberry Pi, these libraries are required as well:* ``libatlas-base-dev``+ * ``libxslt1-dev``You will also need ``build-essential``, ``python3-setuptools`` and ``python3-wheel``for installing some of the python dependencies.@@ -409,8 +425,8 @@ Migration to paperless-ng is then performed in a few simple steps:paperless.3. Download the latest release of paperless-ng. You can either go with the- docker-compose files from `here <https://github.com/jonaswinkler/paperless-ng/tree/master/docker/hub>`_- or clone the repository to build the image yourself.+ docker-compose files from `here <https://github.com/jonaswinkler/paperless-ng/tree/master/docker/compose>`_+ or clone the repository to build the image yourself (see :ref:`above <setup-docker_build>`).You can either replace your current paperless folder or put paperless-ngin a different location.@@ -422,7 +438,7 @@ Migration to paperless-ng is then performed in a few simple steps:will migrate your existing data. After that, your old paperless installationwill be incompatible with the migrated volumes.-4. Copy the ``docker-compose.sqlite.yml`` file to ``docker-compose.yml``.+4. Download the ``docker-compose.sqlite.yml`` file to ``docker-compose.yml``.If you want to switch to PostgreSQL, do that after you migrated your existingSQLite database.