Docker: mount volume other than /var/lib

HI all,
I am trying to mount a directory other than /var/lib from my docker container.

It is exactly the same operation (and) file as described here, Mayan-edms changes with docker volumes - #3 by juance also with no success.

Every time I mount anything other than /var/lib the container crashes.
Is there any way to do this to access the source code for development?
Thanks for your help!

1 Like

Hi,

I don’t understand what you are trying to achieve. If you share more information about your end goal it might be possible to provide more help.

/var/lib/mayan is an internal mount point of the container, it is not a volume, there is no need to change that.

The source code is located here: Mayan EDMS / Mayan EDMS · GitLab

Thanks for your reply. I am trying to mount the directory where the Django source code resides. The point is to develop a new module or debug the existing to understand how it works. In short, I am trying to setup a development environment with the currect Docker image.
As far as I could see, the Django “apps” directory in not under /var/lib/mayan and therefore I would like to find and mount the “apps” Django directory.
Thanks for your help.

The mount point /var/lib/mayan/ is for data only. The Mayan code is located in /opt/mayan-edms and installed as a Python virtualenv in the same location.

Be aware that Django does not provide a method to package and distribute entire applications. Much less to develop and test code changes in live environments.

They way Mayan packages and handles Django code is very different than running Django locally for development.

Since 2015, Mayan has been at the forefront of creating the paradigms and processes to improve these shortcomings of Django.

Many of the techniques pioneered by Mayan are now becoming commonplace. This video will help you understand the challenges and the reasons behind the packaging decisions.

Likewise when it come to packaging and distribution, Django offers no alternatives. Here is how and why Mayan is packaged the way it does. Some of these are now being used by other projects too but the source video will help understand the rationale better.

Regarding the lesser known /opt folder.

https://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/opt.html

This directory is reserved for all the software and add-on packages that are not part of the default installation.

2 Likes

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.