[Mayan EDMS: 1811] Docker Image v2.3: Where to put config?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Mayan EDMS: 1811] Docker Image v2.3: Where to put config?

Mirco Hansen
Hi,

I migrated my Mayan with Docker successfully from 2.1.10 to 2.3. But it seems that Mayan is not reading my config file (as configured stuff is not working).
The file is located here: /var/lib/docker/volumes/mayan_data/_data/settings/local.py

It seems to have the correct file inside the container too. If I run docker exec -it mayan-edms cat /usr/local/lib/python2.7/dist-packages/mayan/media/settings/local.py I see the content of my config file above.

After consulting the documentation I am sure that the file is in the correct place and readable the container. Why is Mayan ignoring it? Or is the content confusing Mayan (some of the content was added by the upgrade so I didn't dare to remove it):
from __future__ import absolute_import

from .base import *

SECRET_KEY = 'xxx'
ALLOWED_HOSTS = ['*']

BROKER_URL = 'redis://127.0.0.1:6379/0'
CELERY_RESULT_BACKEND = 'redis://127.0.0.1:6379/0'
ALLOWED_HOSTS = ['*']

DOCUMENTS_LANGUAGE_CHOICES = (('eng', 'English'), ('deu', 'Deutsch'))
DOCUMENTS_LANGUAGE = 'deu'
MAYAN_COMMON_PAGINATE_BY=50

import os

ALLOWED_HOSTS = ['*']

BROKER_URL = 'redis://127.0.0.1:6379/0'
CELERY_RESULT_BACKEND = 'redis://127.0.0.1:6379/0'

if os.environ.get('MAYAN_USE_POSTGRES', False):
    from .postgres import DATABASES
import os

ALLOWED_HOSTS = ['*']

BROKER_URL = 'redis://127.0.0.1:6379/0'
CELERY_RESULT_BACKEND = 'redis://127.0.0.1:6379/0'

if os.environ.get('MAYAN_USE_POSTGRES', False):
    from .postgres import DATABASES
import os

ALLOWED_HOSTS = ['*']

BROKER_URL = 'redis://127.0.0.1:6379/0'
CELERY_RESULT_BACKEND = 'redis://127.0.0.1:6379/0'

if os.environ.get('MAYAN_USE_POSTGRES', False):
    from .postgres import DATABASES

Thank you in advance.

Cheers
Mirco

--

---
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Mayan EDMS: 1812] Re: Docker Image v2.3: Where to put config?

rosarior
Administrator
There are some partials appended several times remove them, leave only the lines:

from __future__ import absolute_import

from .base import *

SECRET_KEY = 'xxx'
ALLOWED_HOSTS = ['*']

DOCUMENTS_LANGUAGE_CHOICES = (('eng', 'English'), ('deu', 'Deutsch'))
DOCUMENTS_LANGUAGE = 'deu'
MAYAN_COMMON_PAGINATE_BY=50

The setting option for pagination is COMMON_PAGINATE_BY, MAYAN_COMMON_PAGINATE_BY is used for environment variables on version 2.4 (not yet available in Docker image).

On Sunday, June 25, 2017 at 9:29:36 AM UTC-4, Mirco Hansen wrote:
Hi,

I migrated my Mayan with Docker successfully from 2.1.10 to 2.3. But it seems that Mayan is not reading my config file (as configured stuff is not working).
The file is located here: /var/lib/docker/volumes/mayan_data/_data/settings/local.py

It seems to have the correct file inside the container too. If I run docker exec -it mayan-edms cat /usr/local/lib/python2.7/dist-packages/mayan/media/settings/local.py I see the content of my config file above.

After consulting the documentation I am sure that the file is in the correct place and readable the container. Why is Mayan ignoring it? Or is the content confusing Mayan (some of the content was added by the upgrade so I didn't dare to remove it):
from __future__ import absolute_import

from .base import *

SECRET_KEY = 'xxx'
ALLOWED_HOSTS = ['*']

BROKER_URL = 'redis://<a href="http://127.0.0.1:6379/0" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2F127.0.0.1%3A6379%2F0\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFqfdzNqQtEaZWAsQlAy1i5F1LFPw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2F127.0.0.1%3A6379%2F0\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFqfdzNqQtEaZWAsQlAy1i5F1LFPw&#39;;return true;">127.0.0.1:6379/0'
CELERY_RESULT_BACKEND = 'redis://<a href="http://127.0.0.1:6379/0" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2F127.0.0.1%3A6379%2F0\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFqfdzNqQtEaZWAsQlAy1i5F1LFPw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2F127.0.0.1%3A6379%2F0\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFqfdzNqQtEaZWAsQlAy1i5F1LFPw&#39;;return true;">127.0.0.1:6379/0'
ALLOWED_HOSTS = ['*']

DOCUMENTS_LANGUAGE_CHOICES = (('eng', 'English'), ('deu', 'Deutsch'))
DOCUMENTS_LANGUAGE = 'deu'
MAYAN_COMMON_PAGINATE_BY=50

import os

ALLOWED_HOSTS = ['*']

BROKER_URL = 'redis://<a href="http://127.0.0.1:6379/0" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2F127.0.0.1%3A6379%2F0\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFqfdzNqQtEaZWAsQlAy1i5F1LFPw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2F127.0.0.1%3A6379%2F0\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFqfdzNqQtEaZWAsQlAy1i5F1LFPw&#39;;return true;">127.0.0.1:6379/0'
CELERY_RESULT_BACKEND = 'redis://<a href="http://127.0.0.1:6379/0" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2F127.0.0.1%3A6379%2F0\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFqfdzNqQtEaZWAsQlAy1i5F1LFPw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2F127.0.0.1%3A6379%2F0\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFqfdzNqQtEaZWAsQlAy1i5F1LFPw&#39;;return true;">127.0.0.1:6379/0'

if os.environ.get('MAYAN_USE_POSTGRES', False):
    from .postgres import DATABASES
import os

ALLOWED_HOSTS = ['*']

BROKER_URL = 'redis://<a href="http://127.0.0.1:6379/0" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2F127.0.0.1%3A6379%2F0\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFqfdzNqQtEaZWAsQlAy1i5F1LFPw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2F127.0.0.1%3A6379%2F0\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFqfdzNqQtEaZWAsQlAy1i5F1LFPw&#39;;return true;">127.0.0.1:6379/0'
CELERY_RESULT_BACKEND = 'redis://<a href="http://127.0.0.1:6379/0" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2F127.0.0.1%3A6379%2F0\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFqfdzNqQtEaZWAsQlAy1i5F1LFPw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2F127.0.0.1%3A6379%2F0\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFqfdzNqQtEaZWAsQlAy1i5F1LFPw&#39;;return true;">127.0.0.1:6379/0'

if os.environ.get('MAYAN_USE_POSTGRES', False):
    from .postgres import DATABASES
import os

ALLOWED_HOSTS = ['*']

BROKER_URL = 'redis://<a href="http://127.0.0.1:6379/0" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2F127.0.0.1%3A6379%2F0\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFqfdzNqQtEaZWAsQlAy1i5F1LFPw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2F127.0.0.1%3A6379%2F0\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFqfdzNqQtEaZWAsQlAy1i5F1LFPw&#39;;return true;">127.0.0.1:6379/0'
CELERY_RESULT_BACKEND = 'redis://<a href="http://127.0.0.1:6379/0" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2F127.0.0.1%3A6379%2F0\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFqfdzNqQtEaZWAsQlAy1i5F1LFPw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2F127.0.0.1%3A6379%2F0\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFqfdzNqQtEaZWAsQlAy1i5F1LFPw&#39;;return true;">127.0.0.1:6379/0'

if os.environ.get('MAYAN_USE_POSTGRES', False):
    from .postgres import DATABASES

Thank you in advance.

Cheers
Mirco

--

---
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Mayan EDMS: 1813] Re: Docker Image v2.3: Where to put config?

Mirco Hansen
Hello Roberto,

thanks a lot for your quick reply. Yes you are correct, I was reading the v2.4 documentation. Okay, then I will look forward to v2.4 in Docker :-)

I "cleaned" my local.py but your post (adjusted the secret_key) but still english is the default language and there is a huge list of avialablr languages when I add a document.
Do you have any further hint for me?

Thanky you in advance.

Regards
Mirco

Am Sonntag, 25. Juni 2017 17:30:52 UTC+2 schrieb Roberto Rosario:
There are some partials appended several times remove them, leave only the lines:

from __future__ import absolute_import

from .base import *

SECRET_KEY = 'xxx'
ALLOWED_HOSTS = ['*']

DOCUMENTS_LANGUAGE_CHOICES = (('eng', 'English'), ('deu', 'Deutsch'))
DOCUMENTS_LANGUAGE = 'deu'
MAYAN_COMMON_PAGINATE_BY=50

The setting option for pagination is COMMON_PAGINATE_BY, MAYAN_COMMON_PAGINATE_BY is used for environment variables on version 2.4 (not yet available in Docker image).


--

---
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Loading...