getting paperless to work in docker on OMV

    • OMV 4.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • getting paperless to work in docker on OMV

      Hi,
      I'd love to get paperless working in OMV 4 (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 (forums.unraid.net/topic/71733-…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.
    • Have you seen this?
      paperless.readthedocs.io/en/la…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.
      Odroid HC2 - armbian - OMV4.x | Asrock Q1900DC-ITX - Intenso SSD 120GB - OMV4.x
      :!: Backup - Solutions to common problems - OMV setup videos - OMV4 Documentation - user guide :!:

      The post was edited 1 time, last by macom ().

    • 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:
    • 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

      Source Code

      1. ERROR: for consumer Container "1cf6af5f81c4" is unhealthy.
      2. ERROR: Encountered errors while bringing up the project.
      Odroid HC2 - armbian - OMV4.x | Asrock Q1900DC-ITX - Intenso SSD 120GB - OMV4.x
      :!: Backup - Solutions to common problems - OMV setup videos - OMV4 Documentation - user guide :!:

      The post was edited 1 time, last by macom ().

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

      Source Code

      1. version: '2.1'
      2. volumes:
      3. broker:
      4. driver: local
      5. app:
      6. driver: local
      7. db:
      8. driver: local
      9. results:
      10. driver: local
      11. services:
      12. broker:
      13. container_name: mayan-edms-broker
      14. image: healthcheck/rabbitmq
      15. environment:
      16. RABBITMQ_DEFAULT_USER: mayan
      17. RABBITMQ_DEFAULT_PASS: mayan
      18. RABBITMQ_DEFAULT_VHOST: mayan
      19. volumes:
      20. - /srv/dev-disk-by-label-data/mayan/broker:/var/lib/rabbitmq
      21. results:
      22. container_name: mayan-edms-results
      23. image: healthcheck/redis
      24. volumes:
      25. - /srv/dev-disk-by-label-data/mayan/results:/data
      26. db:
      27. container_name: mayan-edms-db
      28. image: healthcheck/postgres
      29. environment:
      30. POSTGRES_DB: mayan
      31. POSTGRES_PASSWORD: mayan-password
      32. POSTGRES_USER: mayan
      33. volumes:
      34. - /srv/dev-disk-by-label-data/mayan/db:/var/lib/postgresql/data
      35. mayan-edms:
      36. container_name: mayan-edms-app
      37. image: mayanedms/mayanedms:latest
      38. depends_on:
      39. broker:
      40. condition: service_healthy
      41. db:
      42. condition: service_healthy
      43. results:
      44. condition: service_healthy
      45. environment:
      46. MAYAN_BROKER_URL: amqp://mayan:mayan@broker:5672/mayan
      47. MAYAN_CELERY_RESULT_BACKEND: redis://results:6379/0
      48. MAYAN_DATABASE_ENGINE: django.db.backends.postgresql
      49. MAYAN_DATABASE_HOST: db
      50. MAYAN_DATABASE_NAME: mayan
      51. MAYAN_DATABASE_PASSWORD: mayan-password
      52. MAYAN_DATABASE_USER: mayan
      53. ports:
      54. - "8888:8000"
      55. volumes:
      56. - /srv/dev-disk-by-label-data/mayan/app:/var/lib/mayan
      Display All
      Odroid HC2 - armbian - OMV4.x | Asrock Q1900DC-ITX - Intenso SSD 120GB - OMV4.x
      :!: Backup - Solutions to common problems - OMV setup videos - OMV4 Documentation - user guide :!:
    • 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.
      Images
      • Capture.PNG

        33.48 kB, 316×356, viewed 9 times
    • 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:

      Source Code

      1. version: '3.0'
      2. volumes:
      3. broker:
      4. driver: local
      5. app:
      6. driver: local
      7. db:
      8. driver: local
      9. results:
      10. driver: local
      11. services:
      12. broker:
      13. container_name: mayan-edms-broker
      14. image: healthcheck/rabbitmq
      15. environment:
      16. RABBITMQ_DEFAULT_USER: mayan
      17. RABBITMQ_DEFAULT_PASS: mayanpass
      18. RABBITMQ_DEFAULT_VHOST: mayan
      19. volumes:
      20. - /srv/dev-disk-by-label-bigraid/mayan/broker:/var/lib/rabbitmq
      21. results:
      22. container_name: mayan-edms-results
      23. image: healthcheck/redis
      24. volumes:
      25. - /srv/dev-disk-by-label-bigraid/mayan/results:/data
      26. db:
      27. container_name: mayan-edms-db
      28. image: healthcheck/postgres
      29. environment:
      30. POSTGRES_DB: mayan
      31. POSTGRES_PASSWORD: mayanpass
      32. POSTGRES_USER: mayan
      33. volumes:
      34. - /srv/dev-disk-by-label-bigraid/mayan/db:/var/lib/postgresql/data
      35. mayan-edms:
      36. container_name: mayan-edms-app
      37. image: mayanedms/mayanedms:latest
      38. depends_on:
      39. - broker
      40. - db
      41. - results
      42. environment:
      43. MAYAN_BROKER_URL: amqp://mayan:mayan@broker:5672/mayan
      44. MAYAN_CELERY_RESULT_BACKEND: redis://results:6379/0
      45. MAYAN_DATABASE_ENGINE: django.db.backends.postgresql
      46. MAYAN_DATABASE_HOST: db
      47. MAYAN_DATABASE_NAME: mayan
      48. MAYAN_DATABASE_PASSWORD: mayanpass
      49. MAYAN_DATABASE_USER: mayan
      50. ports:
      51. - "8888:8000"
      52. volumes:
      53. - /srv/dev-disk-by-label-bigraid/mayan/app:/var/lib/mayan
      Display All
    • Morlan wrote:

      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.
      Odroid HC2 - armbian - OMV4.x | Asrock Q1900DC-ITX - Intenso SSD 120GB - OMV4.x
      :!: Backup - Solutions to common problems - OMV setup videos - OMV4 Documentation - user guide :!:

      The post was edited 1 time, last by macom ().

    • 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):

      Source Code

      1. version: '3.0'
      2. volumes:
      3. data:
      4. driver: local
      5. media:
      6. driver: local
      7. services:
      8. webserver:
      9. container_name: paperlesswebserver
      10. image: thepaperlessproject/paperless
      11. # uncomment the following line to start automatically on system boot
      12. restart: always
      13. ports:
      14. # You can adapt the port you want Paperless to listen on by
      15. # modifying the part before the `:`.
      16. - "8811:8000"
      17. healthcheck:
      18. test: ["CMD", "curl" , "-f", "http://localhost:8000"]
      19. interval: 30s
      20. timeout: 10s
      21. retries: 5
      22. volumes:
      23. - /srv/dev-disk-by-label-bigraid/paperless/data:/usr/src/paperless/data
      24. - /srv/dev-disk-by-label-bigraid/paperless/media:/usr/src/paperless/media
      25. # You have to adapt the local path you want the consumption
      26. # directory to mount to by modifying the part before the ':'.
      27. - /srv/dev-disk-by-label-bigraid/paperlesswatch:/consume
      28. # The reason the line is here is so that the webserver that doesn't do
      29. # any text recognition and doesn't have to install unnecessary
      30. # languages the user might have set in the env-file by overwriting the
      31. # value with nothing.
      32. environment:
      33. PAPERLESS_OCR_LANGUAGES:
      34. PAPERLESS_PASSPHRASE: whateveryouwant
      35. PAPERLESS_CONSUMPTION_DIR: /consume
      36. command: ["gunicorn", "-b", "0.0.0.0:8000"]
      37. consumer:
      38. container_name: paperlessconsumer
      39. image: thepaperlessproject/paperless
      40. # uncomment the following line to start automatically on system boot
      41. restart: always
      42. depends_on:
      43. - webserver
      44. volumes:
      45. - /srv/dev-disk-by-label-bigraid/paperless/data:/usr/src/paperless/data
      46. - /srv/dev-disk-by-label-bigraid/paperless/media:/usr/src/paperless/media
      47. # This should be set to the same value as the consume directory
      48. # in the webserver service above.
      49. - /srv/dev-disk-by-label-bigraid/paperlesswatch:/consume
      50. # Likewise, you can add a local path to mount a directory for
      51. # exporting. This is not strictly needed for paperless to
      52. # function, only if you're exporting your files: uncomment
      53. # it and fill in a local path if you know you're going to
      54. # want to export your documents.
      55. - /srv/dev-disk-by-label-bigraid/paperlessexport:/export
      56. environment:
      57. PAPERLESS_PASSPHRASE: whateveryouwant
      58. PAPERLESS_CONSUMPTION_DIR: /consume
      59. command: ["document_consumer"]
      Display All
    • chrisq wrote:

      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.