Merge pull request #1533 from hedgedoc/feature/database-env

feat(config): Improve configurability of database by env
This commit is contained in:
David Mehren 2021-08-14 23:41:58 +02:00 committed by GitHub
commit cc76201cfb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View file

@ -35,6 +35,14 @@ module.exports = {
forbiddenNoteIDs: toArrayConfig(process.env.CMD_FORBIDDEN_NOTE_IDS),
defaultPermission: process.env.CMD_DEFAULT_PERMISSION,
dbURL: process.env.CMD_DB_URL,
db: {
username: process.env.CMD_DB_USERNAME,
password: process.env.CMD_DB_PASSWORD,
host: process.env.CMD_DB_HOST,
port: process.env.CMD_DB_PORT,
database: process.env.CMD_DB_DATABASE,
dialect: process.env.CMD_DB_DIALECT
},
sessionSecret: process.env.CMD_SESSION_SECRET,
sessionLife: toIntegerConfig(process.env.CMD_SESSION_LIFE),
tooBusyLag: toIntegerConfig(process.env.CMD_TOOBUSY_LAG),