Environment Variables
The common set of settings can also be modified via environment variables when using the Docker image. In addition to the common set of settings, some Docker image specific environment variables are available.
Celery
The Docker image ships with four workers by default. These are named: A, B, C, D. The workers are differentiated by the response time of the tasks they handle. The “A” worker handles the interactive tasks that are expected to complete the fastest and the “D” worker handling the long running tasks.
Worker A
MAYAN_WORKER_A_CONCURRENCY
Optional. Allows setting the worker’s
concurrency
value (https://docs.celeryproject.org/en/stable/userguide/workers.html#concurrency). Default: 0.MAYAN_WORKER_A_MAX_MEMORY_PER_CHILD
Optional. Allows setting the worker’s
max-memory-per-child
value (https://docs.celeryproject.org/en/stable/userguide/workers.html#max-memory-per-child-setting). Default: 500000.MAYAN_WORKER_A_MAX_TASKS_PER_CHILD
Optional. Allows setting the worker’s
maximum_tasks_per_child
value (https://docs.celeryproject.org/en/stable/userguide/workers.html#maximum_tasks_per_child). Default: 250.
Worker B
MAYAN_WORKER_B_CONCURRENCY
Optional. Allows setting the worker’s
concurrency
value (https://docs.celeryproject.org/en/stable/userguide/workers.html#concurrency). Default: 0.MAYAN_WORKER_B_MAX_MEMORY_PER_CHILD
Optional. Allows setting the worker’s
max-memory-per-child
value (https://docs.celeryproject.org/en/stable/userguide/workers.html#max-memory-per-child-setting). Default: 500000.MAYAN_WORKER_B_MAX_TASKS_PER_CHILD
Optional. Allows setting the worker’s
maximum_tasks_per_child
value (https://docs.celeryproject.org/en/stable/userguide/workers.html#maximum_tasks_per_child). Default: 250.
Worker C
MAYAN_WORKER_C_CONCURRENCY
Optional. Allows setting the worker’s
concurrency
value (https://docs.celeryproject.org/en/stable/userguide/workers.html#concurrency). Default: 0.MAYAN_WORKER_C_MAX_MEMORY_PER_CHILD
Optional. Allows setting the worker’s
max-memory-per-child
value (https://docs.celeryproject.org/en/stable/userguide/workers.html#max-memory-per-child-setting). Default: 500000.MAYAN_WORKER_C_MAX_TASKS_PER_CHILD
Optional. Allows setting the worker’s
maximum_tasks_per_child
value (https://docs.celeryproject.org/en/stable/userguide/workers.html#maximum_tasks_per_child). Default: 250.
Worker D
MAYAN_WORKER_D_CONCURRENCY
Optional. Allows setting the worker’s
concurrency
value (https://docs.celeryproject.org/en/stable/userguide/workers.html#concurrency). Default: 1.MAYAN_WORKER_D_MAX_MEMORY_PER_CHILD
Optional. Allows setting the worker’s
max-memory-per-child
value (https://docs.celeryproject.org/en/stable/userguide/workers.html#max-memory-per-child-setting). Default: 500000.MAYAN_WORKER_D_MAX_TASKS_PER_CHILD
Optional. Allows setting the worker’s
maximum_tasks_per_child
value (https://docs.celeryproject.org/en/stable/userguide/workers.html#maximum_tasks_per_child). Default: 250.
Worker E
MAYAN_WORKER_E_CONCURRENCY
Optional. Allows setting the worker’s
concurrency
value (https://docs.celeryproject.org/en/stable/userguide/workers.html#concurrency). Default: 0.MAYAN_WORKER_E_MAX_MEMORY_PER_CHILD
Optional. Allows setting the worker’s
max-memory-per-child
value (https://docs.celeryproject.org/en/stable/userguide/workers.html#max-memory-per-child-setting). Default: 500000.MAYAN_WORKER_E_MAX_TASKS_PER_CHILD
Optional. Allows setting the worker’s
maximum_tasks_per_child
value (https://docs.celeryproject.org/en/stable/userguide/workers.html#maximum_tasks_per_child). Default: 250.
Docker
MAYAN_DOCKER_WAIT
Optional. Make the Docker container wait for a host and port to become available. Multiple hosts and port combinations are supported.
Example:
-e MAYAN_DOCKER_WAIT="db:5432 redis:6379"
MAYAN_USER_GID
Optional. Changes the GID of the
mayan
user internal to the Docker container. Defaults to 1000.MAYAN_USER_UID
Optional. Changes the UID of the
mayan
user internal to the Docker container. Defaults to 1000.
Gunicorn
MAYAN_GUNICORN_LIMIT_REQUEST_LINE
Optional. Allows setting Gunicorn’s
limit_request_line
value (https://docs.gunicorn.org/en/latest/settings.html#limit-request-line). Default: 4094.MAYAN_GUNICORN_MAX_REQUESTS
Optional. Allows setting Gunicorn’s
max_requests
value (https://docs.gunicorn.org/en/latest/settings.html#max-requests). Default: 500.MAYAN_GUNICORN_REQUESTS_JITTER
Optional. Allows setting Gunicorn’s
max_requests_jitter
value (https://docs.gunicorn.org/en/latest/settings.html#max-requests-jitter). Default: 50.MAYAN_GUNICORN_TIMEOUT
Optional. Allows setting Gunicorn’s
timeout
value (https://docs.gunicorn.org/en/latest/settings.html#timeout). Default: 120.MAYAN_GUNICORN_WORKER_CLASS
Optional. Allows setting Gunicorn’s
worker_class
value (https://docs.gunicorn.org/en/latest/settings.html#worker-class). Default: gevent.MAYAN_GUNICORN_WORKERS
Optional. Allows setting Gunicorn’s
workers
value (https://docs.gunicorn.org/en/latest/settings.html#workers). Default: 3.
Mayan EDMS
MAYAN_SETTINGS_MODULE
Optional. Allows loading an alternate settings file.
MAYAN_SKIP_CHOWN_ON_STARTUP
Optional. Setting this environment variable to
true
, will make the entrypoint script skip the initialchwon
command on the media folder at/var/lib/mayan
.
Operating system
MAYAN_APT_INSTALLS
Specifies a list of .deb packages to be installed via APT when the container is first created. The installed packages are not lost when the image is stopped. Example: To install the Tesseract OCR language packs for German and Spanish add the following in your
docker start
command line:-e MAYAN_APT_INSTALLS="tesseract-ocr-deu tesseract-ocr-spa"
Python
MAYAN_PIP_INSTALLS
Specifies a list of Python packages to be installed via
pip
. Packages will be downloaded from the Python Package Index (https://pypi.python.org) by default.
User code
MAYAN_DOCKER_SCRIPT_PRE_SETUP
Optional. Executed after the container’s environment variables are configured but before the UID/GID setup, extra OS package installation and extra Python library installations. Executes the content as a script or call a script using the value as the filename.
MAYAN_DOCKER_SCRIPT_POST_SETUP
Optional. Executed after the container’s environment variables are configured, after the UID/GID setup, extra OS package installation and extra Python library installations but before launching the Mayan EDMS stack. Executes the content as a script or call a script using the value as the filename.
Complete details about these environment variables can be found in the chapter: Executing user scripts