Commit 89754ca7 authored by Nick's avatar Nick

feat: DB_PASS_FILE argument support

parent f01449a2
......@@ -54,6 +54,17 @@ module.exports = {
const packageInfo = require(path.join(WIKI.ROOTPATH, 'package.json'))
// Load DB Password from Docker Secret File
if (process.env.DB_PASS_FILE) {
try {
appconfig.db.pass = fs.readFileSync(process.env.DB_PASS_FILE, 'utf8')
} catch (err) {
console.error(chalk.red.bold(`>>> Failed to read Docker Secret File using path defined in DB_PASS_FILE env variable!`))
console.error(err.message)
process.exit(1)
}
}
WIKI.config = appconfig
WIKI.data = appdata
WIKI.version = packageInfo.version
......
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