Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wiki-js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
wiki-js
Commits
89754ca7
Commit
89754ca7
authored
Sep 21, 2019
by
Nick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: DB_PASS_FILE argument support
parent
f01449a2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
config.js
server/core/config.js
+11
-0
No files found.
server/core/config.js
View file @
89754ca7
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment