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

Worker B

Worker C

Worker D

Worker E

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 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 initial chwon 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