jgillula / paperless-ngx-postprocessor

A powerful and customizable postprocessing script for paperless-ngx
GNU Affero General Public License v3.0
97 stars 10 forks source link

FR: Use paperless-ngx init script #18

Open JigSawFr opened 10 months ago

JigSawFr commented 10 months ago

Hi there, To automate this part https://github.com/jgillula/paperless-ngx-postprocessor#2-run-the-one-time-setup-script-inside-the-paperless-ngx-docker-container I think it's better to use https://docs.paperless-ngx.com/advanced_usage/#custom-container-initialization With this script:

#!/usr/bin/env bash
gosu 1000 /usr/src/paperless/postprocessor/setup_venv.sh

Path to adapt.

Have a nice day,

janwidmer commented 10 months ago

Hey @JigSawFr, can you show me your docker-compose.yml, how you run the custom container initialization script?

My docker-compose volumes look like this:

    volumes:
      - ../data:/usr/src/paperless/data
      - ../media:/usr/src/paperless/media
      - ../export:/usr/src/paperless/export
      - /volume1/paperless-input:/usr/src/paperless/consume
      - /volume1/docker/paperless-ngx/config/paperless-ngx-postprocessor:/usr/src/paperless-ngx-postprocessor
      - /volume1/docker/paperless-ngx/config:/paperless_startup.sh:ro
image

My paperless_setup.sh script looks like this:

image

The console logs are not visible in the docker log of the paperless-webserver-1

Is this correct? docker compose up -d was working, but I don't know if the script was actually running..

tribut commented 6 months ago

Is there a reason why the venv is not created on-demand from post_consume_script.sh?