Repository: jonaswinkler/paperless-ng

Issue #1366: Management utilities  - not found when running in docker?
Created: 2021-10-05T05:25:36Z
This isn't my first rodeo with paperless nor docker, but I'm having trouble getting the management utilities to work by following the documentation at
https://paperless-ng.readthedocs.io/en/latest/administration.html#management-utilities
I'm running via docker-compose, but whether I try docker-compose or docker, or running bash to get a console, all I get is "executable file not found".
myserver:~$ cd paperless-ng
myserver:~/paperless-ng$ sudo docker-compose exec webserver decrypt_documents --passphrase MYPASSPHRASE
OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "decrypt_documents": executable file not found in $PATH: unknown
myserver:~/paperless-ng$ sudo docker ps
CONTAINER ID   IMAGE                 COMMAND                                            PORTS
ead376e5b62e   paperless_consumer    "/sbin/docker-entryp…"   ting (1) 29 seconds ago                                       sumer_1
2eebfb9554b4   paperless_webserver   "/sbin/docker-entryp…"   hours (healthy)           0.0.0.0:8001->8000/tcp, :::8001->800server_1
8632de6d9f21   redis:6.0             "docker-entrypoint.s…"   hours                     6379/tcp                            ker_1
myserver:~/paperless-ng$ sudo docker exec -it 2eeb decrypt_documents --passphrase MYPASSPHRASE
OCI runtime exec failed: exec failed: container_linux.go:380: pocess caused: exec: "decrypt_documents": executable file not found
myserver:~/paperless-ng$ sudo docker exec -it 2eeb bash
bash-5.0# decrypt_documents
bash: decrypt_documents: command not found

Am I  supposed to be executing python manage.py or something else instead?

Duplicate issue #1383: [BUG] decrypt_documents doesn’t do anything
Created: 2021-10-13T04:43:17Z
Describe the bug
I’m running the decrypt_documents management command to remove encryption from my documents. I pass the —passphrase parameter in (not passing it results in an error). However, the command returns almost immediately with no other output.
When I check the media directory, it still has lots of gpg files. I have ~1K documents, of which 90% are encrypted.
Steps to reproduce the behavior:
~/paperless-ng$ sudo docker-compose exec -T webserver python manage.py decrypt_documents

WARNING: This script is going to work directly on your document originals, so
WARNING: you probably shouldn't run this unless you've got a recent backup
WARNING: handy.  It *should* work without a hitch, but be safe and backup your
WARNING: stuff first.

Hit Ctrl+C to exit now, or Enter to continue.

CommandError: Passphrase not defined.  Please set it with --passphrase or by declaring it in your environment or your config.
~/paperless-ng$ sudo docker-compose exec -T webserver python manage.py decrypt_documents --passphrase mypassphrase

WARNING: This script is going to work directly on your document originals, so
WARNING: you probably shouldn't run this unless you've got a recent backup
WARNING: handy.  It *should* work without a hitch, but be safe and backup your
WARNING: stuff first.

Hit Ctrl+C to exit now, or Enter to continue.

Relevant information

Host OS of the machine running paperless: Ubuntu 20.04
Installation method: docker-compose

Closing comment (2021-11-29T08:21:22Z): Duplicate of #1366 ?