referencing to a shared folder in docker container

  • Hello all,

    I've got OMV6 running on a machine with 3 drives.


    Volume 1 is a RAID 1 volume containing drive sda and sdb.

    Drive sdc is the drive where OMV is installed.

    yaz9dfx3pmz81.png?width=2224&format=png&auto=webp&s=0292b47a6c405e7c9b85a3d53ff7d452bec819b4


    t1wpijk7pmz81.png?width=2223&format=png&auto=webp&s=c1f3dbd5f91ed48fff2cf2bc2d554f8f2a77d732



    Now I want to use paperless-ngx to manage my paper documents and archive them.

    I've successfully installed paperless-ngx (https://github.com/paperless-ngx/paperless-ngx)via Docker/Portainer. LogIn is possible etc.


    For saving the documents I've created an shared folder in OMV called paperless.

    This folder contains the folders consume, data, export and media.




    6plxxs4rpmz81.png?width=2236&format=png&auto=webp&s=0fb5ef12c36d35663e5b0fbb556ea240e8cdf902



    4mawvhcupmz81.png?width=766&format=png&auto=webp&s=2dc0cf5e6b4432cbc4b24aafba9f417e83d15e9c



    The 4 directories have been set in the docker-compose file I use in portainer (see code below).

    I can upload documents at Paperless and view them after, but every of the 4 directories stay empty.


    My question is: Why? Is there any mistake in my docker compose file? I've never referenced to a directory in a RAID 1 before, so I assume my docker-compose file is not set up properly.


    I'am pretty new to docker so any help is highly appreciated!


    Thank you very much in advance <3


  • macom

    Hat das Thema freigeschaltet.
    • Offizieller Beitrag

    - data:/srv/dev-disk-by-uuid-6382042f-53da-42b5-8328-2d70a8d49bdd/Paperless/data

    Should be the other way around. Left side is on host, right side is in docker.


    should be:


    - /srv/dev-disk-by-uuid-6382042f-53da-42b5-8328-2d70a8d49bdd/Paperless/data::/usr/src/paperless/data


    Basically, keep the right side as mentioned in the template and adjust the left side according your needs

    • Offizieller Beitrag

    volumes: data: media: pgdata: redisdata:

    remove that as you are using bind mounts and not volumes; volumes would be on your os drive in /var/lib/docker/volumes


    After deploying a stack, always check the logs of each container to see, if everything goes well

  • Hi Macom,


    thank you very much for clarifying!


    I've changed the my compose file as follow and removed the "volumes" section at the end of the file.


    Unfortunately, portainer wont update the stack because of the following error:


    Failure

    failed to deploy a stack: Duplicate mount points: [/srv/dev-disk-by-uuid-6382042f-53da-42b5-8328-2d70a8d49bdd/Paperless/data:.:/usr/src/paperless/data, /srv/dev-disk-by-uuid-6382042f-53da-42b5-8328-2d70a8d49bdd/Paperless/media:.:/usr/src/paperless/media, /srv/dev-disk-by-uuid-6382042f-53da-42b5-8328-2d70a8d49bdd/Paperless/export:.:/usr/src/paperless/export, /srv/dev-disk-by-uuid-6382042f-53da-42b5-8328-2d70a8d49bdd/Paperless/consume:.:/usr/src/paperless/consume] : exit status 1


    Tried to remove all docker volumes and compose again. Unfortunately this did not resolve the error message.

    • Offizieller Beitrag

    You still have two volumes for db and broker.


    And these

    Code
     - /srv/dev-disk-by-uuid-6382042f-53da-42b5-8328-2d70a8d49bdd/Paperless/data::/usr/src/paperless/data

    should be like this

    Code
     - /srv/dev-disk-by-uuid-6382042f-53da-42b5-8328-2d70a8d49bdd/Paperless/data:/usr/src/paperless/data

    only one ":"

  • It works! Had to change the db and broker volume paths too.

    Thank you so much macom ! Learned a lot!


    Maybe someone runs into the same issue, so here is the docker-compose file which works for me to get the paperless-data on my raid1-volume:


  • bux024

    Hat das Label gelöst hinzugefügt.

Jetzt mitmachen!

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