Discussion:
[Mayan EDMS: 2001] docker local.py settings import error
Tony Nys
2017-08-11 05:47:50 UTC
Permalink
as I see, the mounted docker folder eg. mayan_data, needs a subfolder
"settings".
Mayan will check if a local.py file exist , and if not do an initial
installation and create a local.py file in that folder

But when I start mayan the 2nd time, so the file exists, it gives the error

mayan.settings <208> [ERROR] "<module>() Error importing user's local.py;
No module named media.settings.local"

so my local.py is in /Users/tony/mayan_data/settings

Starting docker:

docker run --name mayanedmspostgresql -p 80:80 -v
/Users/tony/mayan_data/:/var/lib/mayan mayanedms/mayanedms
--
---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Roberto Rosario
2017-08-11 06:06:40 UTC
Permalink
This is a problem cause by a design decision of Docker that initializes
volumes in different ways depending on the type of volume:
https://gitlab.com/mayan-edms/mayan-edms-docker/issues/6#note_22653707

Until Docker fixes this use only named volumes when deploying the Mayan
Docker image.
Post by Tony Nys
as I see, the mounted docker folder eg. mayan_data, needs a subfolder
"settings".
Mayan will check if a local.py file exist , and if not do an initial
installation and create a local.py file in that folder
But when I start mayan the 2nd time, so the file exists, it gives the error
mayan.settings <208> [ERROR] "<module>() Error importing user's local.py;
No module named media.settings.local"
so my local.py is in /Users/tony/mayan_data/settings
docker run --name mayanedmspostgresql -p 80:80 -v
/Users/tony/mayan_data/:/var/lib/mayan mayanedms/mayanedms
--
---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Tony Nys
2017-08-11 07:11:11 UTC
Permalink
Thanks Roberto , but i still have the same issue:
now I do this
docker volume create --name mayan_media --opt type=none --opt
device=/Users/tony/mayan_data --opt o=bind
docker volume create --name mayan_settings --opt type=none --opt
device=/Users/tony/mayan_data --opt o=bind
docker run --env-file=/Users/tony/mayanlocalpostgres.properties --name
mayanedmspostgresql -p 80:80 -v mayan_media:/var/lib/mayan -v
mayan_settings:/etc/mayan mayanedms/mayanedms

still same error:

mayan.settings <217> [ERROR] "<module>() Error importing user's local.py;
No module named media.settings.local"
Post by Tony Nys
as I see, the mounted docker folder eg. mayan_data, needs a subfolder
"settings".
Mayan will check if a local.py file exist , and if not do an initial
installation and create a local.py file in that folder
But when I start mayan the 2nd time, so the file exists, it gives the error
mayan.settings <208> [ERROR] "<module>() Error importing user's local.py;
No module named media.settings.local"
so my local.py is in /Users/tony/mayan_data/settings
docker run --name mayanedmspostgresql -p 80:80 -v
/Users/tony/mayan_data/:/var/lib/mayan mayanedms/mayanedms
--
---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Tony Nys
2017-08-11 07:12:12 UTC
Permalink
this is my local.py:


from __future__ import absolute_import

from .base import *

SECRET_KEY = 'foo'
Post by Tony Nys
now I do this
docker volume create --name mayan_media --opt type=none --opt
device=/Users/tony/mayan_data --opt o=bind
docker volume create --name mayan_settings --opt type=none --opt
device=/Users/tony/mayan_data --opt o=bind
docker run --env-file=/Users/tony/mayanlocalpostgres.properties --name
mayanedmspostgresql -p 80:80 -v mayan_media:/var/lib/mayan -v
mayan_settings:/etc/mayan mayanedms/mayanedms
mayan.settings <217> [ERROR] "<module>() Error importing user's local.py;
No module named media.settings.local"
Post by Tony Nys
as I see, the mounted docker folder eg. mayan_data, needs a subfolder
"settings".
Mayan will check if a local.py file exist , and if not do an initial
installation and create a local.py file in that folder
But when I start mayan the 2nd time, so the file exists, it gives the error
mayan.settings <208> [ERROR] "<module>() Error importing user's local.py;
No module named media.settings.local"
so my local.py is in /Users/tony/mayan_data/settings
docker run --name mayanedmspostgresql -p 80:80 -v
/Users/tony/mayan_data/:/var/lib/mayan mayanedms/mayanedms
--
---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...