Expand custom Python setting section

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2019-11-18 17:13:27 -04:00
parent cd5da60063
commit 35aafc3f70
5 changed files with 23 additions and 7 deletions

View File

@@ -146,14 +146,14 @@ For another setup that offers more performance and scalability refer to the
|MAYAN_BIN| preparestatic --noinput
11. Create the supervisor file at ``/etc/supervisor/conf.d/mayan.conf``:
11. Create the supervisor file at ``|MAYAN_SUPERVISOR_CONF|``:
------------------------------------------------------------------------
::
sudo MAYAN_DATABASE_ENGINE=django.db.backends.postgresql MAYAN_DATABASE_NAME=mayan \
MAYAN_DATABASE_PASSWORD=mayanuserpass MAYAN_DATABASE_USER=mayan \
MAYAN_DATABASE_HOST=127.0.0.1 MAYAN_MEDIA_ROOT=|MAYAN_MEDIA_ROOT| \
|MAYAN_BIN| platformtemplate supervisord > /etc/supervisor/conf.d/mayan.conf
|MAYAN_BIN| platformtemplate supervisord > |MAYAN_SUPERVISOR_CONF|
12. Configure Redis:
@@ -220,7 +220,7 @@ of a restart or power failure. The Gunicorn workers are increased to 3.
sudo rabbitmqctl set_permissions -p mayan mayan ".*" ".*" ".*"
4. Edit the supervisor file at ``/etc/supervisor/conf.d/mayan.conf``:
4. Edit the supervisor file at ``|MAYAN_SUPERVISOR_CONF|``:
---------------------------------------------------------------------
Replace (paying attention to the comma at the end)::

View File

@@ -108,6 +108,17 @@ or via the ``DJANGO_SETTINGS_MODULE`` environment variable like this::
export DJANGO_SETTINGS_MODULE=mayan.media.mayan_settings.mysettings
To make the use of the custom Python setting file permanent, update the ``|MAYAN_SUPERVISOR_CONF|``
file. In the ``[supervisord]`` section, update the ``environment=`` value of
``DJANGO_SETTINGS_MODULE`` from the default ``mayan.settings.production`` to
``mayan.media.mayan_settings.mysettings``. Pay attention to the indentation of
the ``environment=`` entries.
Force supervisor to read the changes and restart using::
sudo supervisorctl reread
sudo supervisorctl restart all
For the :doc:`../chapters/docker` installation method, the full import path will be
``mayan_settings.mysettings`` and can only be passed via the
``MAYAN_SETTINGS_MODULE`` environment variable like this::