fix: use dev database as default for pazuz
This commit is contained in:
parent
62ce359a80
commit
b9114b6a33
2 changed files with 10 additions and 7 deletions
|
|
@ -6,6 +6,8 @@ const _ = require('lodash/fp')
|
|||
|
||||
require('dotenv').config()
|
||||
|
||||
const DATABASE = process.env.LAMASSU_DB ?? 'DEV'
|
||||
|
||||
const dbMapping = psqlConf => ({
|
||||
STRESS_TEST: _.replace('lamassu', 'lamassu_stress', psqlConf),
|
||||
RELEASE: _.replace('lamassu', 'lamassu_release', psqlConf),
|
||||
|
|
@ -39,7 +41,7 @@ function load () {
|
|||
opts: JSON.parse(fs.readFileSync(globalConfigPath))
|
||||
}
|
||||
|
||||
config.opts.postgresql = dbMapping(config.opts.postgresql)[process.env.LAMASSU_DB]
|
||||
config.opts.postgresql = dbMapping(config.opts.postgresql)[DATABASE]
|
||||
|
||||
return config
|
||||
} catch (_) {
|
||||
|
|
@ -50,7 +52,7 @@ function load () {
|
|||
opts: JSON.parse(fs.readFileSync(homeConfigPath))
|
||||
}
|
||||
|
||||
config.opts.postgresql = dbMapping(config.opts.postgresql)[process.env.LAMASSU_DB]
|
||||
config.opts.postgresql = dbMapping(config.opts.postgresql)[DATABASE]
|
||||
|
||||
return config
|
||||
} catch (_) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue