Closed SeriouZ12 closed 1 year ago
Great question!
For me on my regular old Linux box running paperless-ngx as a docker container, I would run the command
docker-compose exec -u paperless webserver /usr/src/paperless-ngx-postprocessor/setup_venv.sh
from a regular terminal on the Linux box.
Essentially the:
docker-compose exec
part says "run this command in a docker container"-u paperless
says "run as user paperless inside that container"webserver
specifies which docker container I want to run the command in/usr/src/paperless-ngx-postprocessor/setup_venv.sh
is the location inside the docker container of the command I want to run (i.e. there is no /usr/src/paperless-ngx-postprocessor/setup_venv.sh
located on my Linux box--it's in the filesystem within the webserver
docker container)So essentially what you're trying to make happen is have the /usr/src/paperless-ngx-postprocessor/setup_venv.sh
script, which is already inside the container (since you did steps 0 and 1), run as the user paperless
inside the container. I'm not sure how to make that happen with Portainer, but that's the goal. It sounds like you could just connect into a terminal in the container (making sure to be the paperless
user) and run it, but since I've never used Portainer I'm not 100% sure if it will work.
I hope that helps, and please let me know if you succeed (or fail 🙃).
HI, thx for the quick reply. I figured you mean the user i set in the UserMap_UID. This is my paperless user. Then i connect into my Contaienr and go to the script and try to run it. At first it gave me: Then i found out i cloned it on a windows machine and needed the --config core.autocrlf=input parameter with the git command. Then it worked :D
Do i need to put the Token i created anywhere? I only have consumer and root as possible users in the token creation.
I figured you mean the user i set in the UserMap_UID. This is my paperless user.
Yes, good catch--whatever user paperless-ngx runs as is the right user to use.
For the token, you don't need to stash it anywhere unless you want to be able to run the standalone command-line script (as opposed to the automatic post-consumption script).
The reason the post-consumption script doesn't need the token is because it will run as the same user that runs paperless-ngx, and so it can just go retrieve the token straight out of paperless-ngx's database. paperless-ngx-postprocessor
grabs the first token it sees, so if you do want it to use a particular token, you can do so as described in the configuration.
That´s awesome. For now with my blank Paperless i will try to train it to recognize the documents with tags and the right correspondent and then rename them all, once i decided on a adequat rule.
Thank you for the help :)
Hello,
at first id like to thank you very much for your work. Ive gone into Paperless thinking that renaming the title of the document was a very important feature, since my scanner saves everything as Image_001.pdf. After lots of experimenting i found out, it can´t do that :D So here is my problem: I installed it on my Synology Nas with Portainer and as an absolute noob to docker, i don´t understand how to get step 2 of your description to work. Do i connect inside the Container, navigate to the Script and execute it, or do use a custom command via the console?
Thx in advance!