Automate paths in documentation

Paths are now configure in docs/conf.py to ensure
consistency and avoid human error.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2019-11-18 16:44:07 -04:00
parent ec86d7679a
commit cd5da60063
8 changed files with 66 additions and 45 deletions

View File

@@ -266,8 +266,22 @@ extlinks = {
def setup(app):
BASE_DIRECTORY = '/opt/'
MAYAN_INSTALLATION_DIRECTORY = os.path.join(BASE_DIRECTORY, 'mayan-edms')
MAYAN_MEDIA_ROOT = os.path.join(MAYAN_INSTALLATION_DIRECTORY, 'media')
MAYAN_PYTHON_BIN_DIR = os.path.join(MAYAN_INSTALLATION_DIRECTORY, 'bin')
MAYAN_GUNICORN_BIN = os.path.join(MAYAN_PYTHON_BIN_DIR, 'gunicorn')
MAYAN_PIP_BIN = os.path.join(MAYAN_PYTHON_BIN_DIR, 'pip')
MAYAN_BIN = os.path.join(MAYAN_PYTHON_BIN_DIR, 'mayan-edms.py')
environment_variables = utils.load_env_file()
environment_variables['DOCKER_MAYAN_IMAGE_VERSION'] = mayan.__version__
environment_variables['MAYAN_INSTALLATION_DIRECTORY'] = MAYAN_INSTALLATION_DIRECTORY
environment_variables['MAYAN_MEDIA_ROOT'] = MAYAN_MEDIA_ROOT
environment_variables['MAYAN_PYTHON_BIN_DIR'] = MAYAN_PYTHON_BIN_DIR
environment_variables['MAYAN_GUNICORN_BIN'] = MAYAN_GUNICORN_BIN
environment_variables['MAYAN_PIP_BIN'] = MAYAN_PIP_BIN
environment_variables['MAYAN_BIN'] = MAYAN_BIN
substitutions = utils.generate_substitutions(
dictionary=environment_variables
)