mayan:init fails if you mount host directories instead of using named volumes
If I run the exact init command in the readme, everything works fine.
docker run --rm -v mayan_media:/var/lib/mayan -v mayan_settings:/etc/mayan mayanedms/mayanedms mayan:init
However, if I try to mount a host directory (using the command below) instead of using named volumes, then I get a Python error. For reference, here is the Docker documentation on mounting host directories as volumes
docker run --rm -v /tmp/mayanedms/mayan_media:/var/lib/mayan -v /tmp/mayanedms/mayan_settings:/etc/mayan mayanedms/mayanedms mayan:init
What I have tried:
- I ran the container, logged in, and could verify that I have read and write access to the mounted host directories
- I was able to create a file on the host and access it from the container, and vice versa (from a Docker perspective, the mount is working as expected)
- I've tried different directories on the host, and still have the issue
- I've reproduced this on two hosts, one running Slackware and one running OS X
- The exact same volume syntax I'm trying works without issue for other containers running on the same hosts
Stacktrace:
Traceback (most recent call last):
File "/usr/local/bin/mayan-edms.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 303, in execute
settings.INSTALLED_APPS
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 48, in __getattr__
self._setup(name)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 44, in _setup
self._wrapped = Settings(settings_module)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 92, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named settings