Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Merge branch 'dev' into feature-websockets-status

jonaswinkler46ea86a6d2ef
diff --cc docs/setup.rst
index 60a8b79d4,afb3784d6..248bc558e
--- a/docs/setup.rst
+++ b/docs/setup.rst
@@@ -87,9 -87,10 +87,10 @@@ You can go multiple routes to setup an
* :ref:`Use ansible to install Paperless on your system automatically (bare metal) <setup-ansible>`
The Docker routes are quick & easy. These are the recommended routes. This configures all the stuff
- from above automatically so that it just works and uses sensible defaults for all configuration options.
+ from the above automatically so that it just works and uses sensible defaults for all configuration options.
-Here you find a cheat-sheet for docker beginners: `CLI Basics <https://sehn.tech/post/devops-with-docker/>`_
++Here you find a cheat-sheet for docker beginners: `CLI Basics <https://sehn.tech/post/devops-with-docker/>`_
- The bare metal route is more complicated to setup but makes it easier
+ The bare metal route is complicated to setup but makes it easier
should you want to contribute some code back. You need to configure and
run the above mentioned components yourself.
@@@ -121,7 -126,8 +126,8 @@@ Install Paperless from Docker Hu
If you want to use the included ``docker-compose.*.yml`` file, you
need to have at least Docker version **17.09.0** and docker-compose
- version **1.17.0**.
+ version **1.17.0**.
+ To check do: `docker-compose -v` or `docker -v`
See the `Docker installation guide`_ on how to install the current
version of Docker for your operating system or Linux distribution of
@@@ -164,16 -170,20 +170,20 @@@
.. caution::
- Certain file systems such as NFS network shares don't support file system
+ Some file systems such as NFS network shares don't support file system
notifications with ``inotify``. When storing the consumption directory
- on such a file system, paperless will be unable to pick up new files
+ on such a file system, paperless will not pick up new files
with the default configuration. You will need to use ``PAPERLESS_CONSUMER_POLLING``,
which will disable inotify. See :ref:`here <configuration-polling>`.
-
+
- 5. Run ``docker-compose up -d``. This will create and start the necessary
- containers.
+ 6. Now head over to: https://hub.docker.com/r/jonaswinkler/paperless-ng and choose your preferred
+ image and copy the link. To download this image do a `docker pull` followed by the link. Do this within the directory with the .yml files.
+ Depending on your network connection and CPU this will take a while. You have time to get a beverage.
- 6. To be able to login, you will need a super user. To create it, execute the
+ 7. Run ``docker-compose up -d``. This will create and start the necessary
+ containers, but your are not done yet!
+
+ 8. To be able to login, you will need a super user. To create it, execute the
following command:
.. code-block:: shell-session
@@@ -181,12 -191,12 +191,12 @@@
$ docker-compose run --rm webserver createsuperuser
This will prompt you to set a username, an optional e-mail address and
- finally a password.
+ finally a password (at least 8 characters).
- 7. The default ``docker-compose.yml`` exports the webserver on your local port
+ 9. The default ``docker-compose.yml`` exports the webserver on your local port
8000. If you haven't adapted this, you should now be able to visit your
- Paperless instance at ``http://127.0.0.1:8000``. You can login with the
- user and password you just created.
- Paperless instance at ``http://127.0.0.1:8000`` or your servers IP-Address:8000.
++ Paperless instance at ``http://127.0.0.1:8000`` or your servers IP-Address:8000.
+ Use the login credentials you have created with the previous step.
.. _Docker: https://www.docker.com/
.. _docker-compose: https://docs.docker.com/compose/install/
@@@ -214,7 -224,7 +224,7 @@@ Build the docker image yoursel
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
@@@ -244,8 -254,8 +254,8 @@@ writing. Windows is not and will never
1. Install dependencies. Paperless requires the following packages.
- * ``python3`` 3.6, 3.7, 3.8 (3.9 is untested).
+ * ``python3`` 3.6, 3.7, 3.8, 3.9
- * ``python3-pip``, optionally ``pipenv`` for package installation
+ * ``python3-pip``
* ``python3-dev``
* ``fonts-liberation`` for generating thumbnails for plain text files
@@@ -406,7 -427,7 +427,7 @@@ Install Paperless using ansibl
This role currently only supports Debian 10 Buster and Ubuntu 20.04 Focal or later as target hosts.
--1. Install ansible 2.7+ on the management node.
++1. Install ansible 2.7+ on the management node.
This may be the target host paperless-ng is being installed on or any remote host which can access the target host.
For further details, check the ansible `inventory <https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html>`_ documentation.
@@@ -553,11 -577,18 +577,18 @@@ Migration to paperless-ng is then perfo
.. caution::
- Paperless includes a ``.env`` file. This will set the
- project name for docker compose to ``paperless`` so that paperless-ng will
- automatically reuse your existing paperless volumes. When you start it, it
- will migrate your existing data. After that, your old paperless installation
- will be incompatible with the migrated volumes.
+ Paperless-ng includes a ``.env`` file. This will set the
+ project name for docker compose to ``paperless``, which will also define the name
+ of the volumes by paperless-ng. However, if you experience that paperless-ng
+ is not using your old paperless volumes, verify the names of your volumes with
+
+ .. code:: shell-session
+
+ $ docker volume ls | grep _data
-
++
+ and adjust the project name in the ``.env`` file so that it matches the name
+ of the volumes before the ``_data`` part.
+
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 existing
diff --cc src/documents/consumer.py
index 146b11014,5e76ad03a..f8f7576ef
--- a/src/documents/consumer.py
+++ b/src/documents/consumer.py
@@@ -262,15 -201,8 +262,9 @@@ class Consumer(LoggingMixin)
# reloading the classifier multiple times, since there are multiple
# post-consume hooks that all require the classifier.
- try:
- classifier = DocumentClassifier()
- classifier.reload()
- except (OSError, EOFError, IncompatibleClassifierVersionError) as e:
- self.log(
- "warning",
- f"Cannot classify documents: {e}.")
- classifier = None
+ classifier = load_classifier()
+
+ self._send_progress(95, 100, 'WORKING', MESSAGE_SAVE_DOCUMENT)
# now that everything is done, we can start to store the document
# in the system. This will be a transaction and reasonably fast.
try:
diff --cc src/documents/tests/test_consumer.py
index 22e6afb61,02d1d0004..a6f0cc55a
--- a/src/documents/tests/test_consumer.py
+++ b/src/documents/tests/test_consumer.py
@@@ -458,9 -420,7 +458,9 @@@ class TestConsumer(DirectoriesMixin, Te
self.assertIsNotNone(os.path.isfile(document.title))
self.assertTrue(os.path.isfile(document.source_path))
+ self._assert_first_last_send_progress()
+
- @mock.patch("documents.consumer.DocumentClassifier")
+ @mock.patch("documents.consumer.load_classifier")
def testClassifyDocument(self, m):
correspondent = Correspondent.objects.create(name="test")
dtype = DocumentType.objects.create(name="test")