Unverified Commit 89e88131 authored by Darlan Alves's avatar Darlan Alves Committed by GitHub
Browse files

feat: allow a docs directory coming from env

Current config assumes /data/docs to be part of the current data directory.

This allows DOCS_DIR to be mounted from a different path outside of DATA_DIR, or falls back to the previous behaviour if DOCS_DIR is not in the environment
parent 2fa94956
...@@ -162,7 +162,7 @@ Path(CACHE_DIR).mkdir(parents=True, exist_ok=True) ...@@ -162,7 +162,7 @@ Path(CACHE_DIR).mkdir(parents=True, exist_ok=True)
# Docs DIR # Docs DIR
#################################### ####################################
DOCS_DIR = f"{DATA_DIR}/docs" DOCS_DIR = os.getenv("DOCS_DIR", f"{DATA_DIR}/docs")
Path(DOCS_DIR).mkdir(parents=True, exist_ok=True) Path(DOCS_DIR).mkdir(parents=True, exist_ok=True)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment