mirror of
https://github.com/zadam/trilium.git
synced 2025-01-15 11:39:37 +08:00
allow configuration of log, backup etc. directories per env variables, closes #3446
This commit is contained in:
parent
0f0ca51bd6
commit
062e8c4b84
1 changed files with 8 additions and 6 deletions
|
@ -59,12 +59,14 @@ function getTriliumDataDir() {
|
|||
return appDataPath;
|
||||
}
|
||||
|
||||
const TRILIUM_DATA_DIR = getTriliumDataDir();
|
||||
const DOCUMENT_PATH = `${TRILIUM_DATA_DIR + path.sep}document.db`;
|
||||
const BACKUP_DIR = `${TRILIUM_DATA_DIR + path.sep}backup`;
|
||||
const LOG_DIR = `${TRILIUM_DATA_DIR + path.sep}log`;
|
||||
const ANONYMIZED_DB_DIR = `${TRILIUM_DATA_DIR + path.sep}anonymized-db`;
|
||||
const CONFIG_INI_PATH = `${TRILIUM_DATA_DIR}/config.ini`;
|
||||
const TRILIUM_DATA_DIR = getTriliumDataDir();
|
||||
const DIR_SEP = TRILIUM_DATA_DIR + path.sep;
|
||||
|
||||
const DOCUMENT_PATH = process.env.TRILIUM_DOCUMENT_PATH || `${DIR_SEP}document.db`;
|
||||
const BACKUP_DIR = process.env.TRILIUM_BACKUP_DIR || `${DIR_SEP}backup`;
|
||||
const LOG_DIR = process.env.TRILIUM_LOG_DIR || `${DIR_SEP}log`;
|
||||
const ANONYMIZED_DB_DIR = process.env.TRILIUM_ANONYMIZED_DB_DIR || `${DIR_SEP}anonymized-db`;
|
||||
const CONFIG_INI_PATH = process.env.TRILIUM_CONFIG_INI_PATH || `${DIR_SEP}config.ini`;
|
||||
|
||||
module.exports = {
|
||||
TRILIUM_DATA_DIR,
|
||||
|
|
Loading…
Reference in a new issue