getting paperless to work in docker on OMV

  • Hi,
    I'd love to get paperless working in OMV 4 (https://hub.docker.com/r/thepaperlessproject/paperless) but the docs for setup use docker compose so I'm at a bit of a loss what I need to put in to omv's docker setup to get it to run on omv. I found a howto for unraid (https://forums.unraid.net/topi…perless-dockerhub-unraid/) but it's a bit complicated involving running two separate dockers. I'd really appreciate some pointers on how to adapt the howto to OMV. If technodadlife happened to be willing to do a video howto that would be most epic of him.

    • Offizieller Beitrag

    Have you seen this?
    https://paperless.readthedocs.…setup-installation-docker


    You can run the docker-compose file either from CLI or within portainer
    [How-To] Use docker-compose files in Portainer


    Edit: looks like you have to run the docker-compose file from the CLI.

  • I was looking at that actually. I was unaware that I could run the compose file through portainer or the CLI, I've only ever used the web interface. I will check it out, thanks!

  • so I modified the compose file as follows and deleted the reference to the env file and just added the environmental variables but I get "deployment error yaml:unmarshal errors: line 1: cannot unmarshal !!str '2.1' into config.RawService is this because it's 2.1 and not version 2.0? I tried just changing the version number with no luck.


    version: '2.1'


    services:
    webserver:
    build: ./
    # uncomment the following line to start automatically on system boot
    restart: always
    ports:
    # You can adapt the port you want Paperless to listen on by
    # modifying the part before the `:`.
    - "8001:8000"
    healthcheck:
    test: ["CMD", "curl" , "-f", "http://localhost:8001"]
    interval: 30s
    timeout: 10s
    retries: 5
    volumes:
    - /srv/dev-disk-by-label-bigraid/dockerconf/paperless/data:/usr/src/paperless/data
    - /srv/dev-disk-by-label-bigraid/dockerconf/paperless/media:/usr/src/paperless/media
    # You have to adapt the local path you want the consumption
    # directory to mount to by modifying the part before the ':'.
    - /srv/dev-disk-by-label-bigraid/paperless:/consume
    # The reason the line is here is so that the webserver that doesn't do
    # any text recognition and doesn't have to install unnecessary
    # languages the user might have set in the env-file by overwriting the
    # value with nothing.
    environment:
    - PAPERLESS_OCR_LANGUAGES=eng
    command: ["gunicorn", "-b", "0.0.0.0:8000"]


    consumer:
    build: ./
    # uncomment the following line to start automatically on system boot
    restart: always
    depends_on:
    webserver:
    condition: service_healthy
    volumes:
    - /srv/dev-disk-by-label-bigraid/dockerconf/paperless/data:/usr/src/paperless/data
    - /srv/dev-disk-by-label-bigraid/dockerconf/paperless/media:/usr/src/paperless/media
    # This should be set to the same value as the consume directory
    # in the webserver service above.
    - /srv/dev-disk-by-label-bigraid/paperless:/consume
    # Likewise, you can add a local path to mount a directory for
    # exporting. This is not strictly needed for paperless to
    # function, only if you're exporting your files: uncomment
    # it and fill in a local path if you know you're going to
    # want to export your documents.
    # - /path/to/another/arbitrary/place:/export
    env_file: docker-compose.env
    command: ["document_consumer"]


    volumes:
    data:
    media:

    • Offizieller Beitrag

    I try also to get it running. Up to now no success. Will report if/when I get a working compose file ;)


    This is the error I get


    Code
    ERROR: for consumer  Container "1cf6af5f81c4" is unhealthy.
    ERROR: Encountered errors while bringing up the project.
    • Offizieller Beitrag

    Just set up mayan-edms with this docker-compose file (on OMV5)
    the file is based on this one: https://github.com/mayan-edms/…docker/docker-compose.yml

  • I'll take a look at mayan. In my original search for a document manager paper seemed to be more popular and have the right amount of complexity for my needs while mayan seemed to be way overkill and not as developed (although looking on their gitlab page I now see that wherever said they had their last commit 2 years ago was incorrect).

  • I'm on the latest OMV4 and I get the following error trying to deploy the stack on portainer. I'm guessing I'm out of luck because the docker/portainer in omv4 are too old? I only get this error after I comment out the version info, which stops it from running as well.

  • I ended up running "docker swarm init" on the CLI so that create stack would use "docker stack deploy" instead of "docker compose" which got mayan working but ended up being a bit obnoxious because I had to update it to version 3 of the yml, which made health checks needlessly complex. I ended up just ignoring the health check and making it depend on the start of the other packages but not on the health check, which appears to have gotten mayan up and running.


    My 3.0 yml:

  • On my test VM I was able to successfully bring up the paperless container with the default docker-compose.yml. The only change I had to make was to change the webserver external port.
    Oh, and I had to bring docker-compose to a newer version before it was able to deal with the 2.1 format.

    • Offizieller Beitrag

    was able to successfully bring up the paperless container with the default docker-compose.yml. The only change I had to make was to change the webserver external port.


    Would you post the docker-compose.yml? I also changed only the external port and the path. However, I tried it on OMV5 / Buster.


    edit: I tried again without defining USERMAP_UID and USERMAP_GID in docker-compose.env. Now it is working.

  • macom, I was actually messing around with this after working through getting mayan running and I believe I have a passable compose file below t hat works with my swarm enabled docker that takes v 3+ yml files. I'm just in the process of logging in and configuring but the below got it up and running. I hacked the env file into the yml since I don't know how to point portainer to an env file and didn't want to manually input env variables (I basically know enough to be dangerous to myself and other here, I am not advocating anyone use this, I'm just posting in case it helps someone or in case someone notices something truly messed up below and has suggestions):

  • I was actually messing around with this after working through getting mayan running and I believe I have a passable compose file below t hat works with my swarm enabled docker that takes v 3+ yml files. I'm just in the process of logging in and configuring but the below got it up and running. I hacked the env file into the yml since I don't know how to point portainer to an env file and didn't want to manually input env variables (I basically know enough to be dangerous to myself and other here, I am not advocating anyone use this, I'm just posting in case it helps someone or in case someone notices something truly messed up below and has suggestions):

    Why dont you just use the original provided docker-compose.yml with docker-compose in CLI? It is by far the easiest and supported way.

  • Just one hint from my experiences with paperless docker on openmediavault 5: I tried to get it running the last 2 weeks or so and had no luck. I always got the issue that the sudoers-file permissions are incorrect inside the container.

    Today (as the very last idea) I updated the docker-compose binaries to the latest ones (currently 1.27.4), following the official linux guide: https://docs.docker.com/compose/install/ and it finally worked as expected.


    Maybe this helps anyone.


    My answer to the question: Why paperless? As the author states on his git-Page: It just works!

    I have (currently) no need for a full blown document management system like mayan-edms but I'll definitely give that one a try in the future.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!