Skip to content

Commit d558b4f

Browse files
committed
fix(docker): crash missing config option
1 parent a1ab9fb commit d558b4f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

app.js

+10
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,16 @@ function checkForOldConfig () {
108108

109109
function start () {
110110
if (!isDocker) loadConfig()
111+
if (isDocker) {
112+
// Load some defaults for JWT token that is missing when using docker
113+
const jwt = process.env.TRUDESK_JWTSECRET
114+
nconf.defaults({
115+
tokens: {
116+
secret: jwt || chance.hash() + chance.md5(),
117+
expires: 900
118+
}
119+
})
120+
}
111121

112122
const _db = require('./src/database')
113123

0 commit comments

Comments
 (0)