* Allow specifying DB file explicitely. * Export config getter/setter instead of object Allows dynamically changing configuration * Remove maxWorker Jest limit, parallelize tests * Remove unnecessary slow step in Dockerfile. * Correct error response during login * Fix setting DB permissions in docker entrypoint --------- Co-authored-by: antanst <>
40 lines
988 B
JavaScript
40 lines
988 B
JavaScript
require('dotenv').config();
|
|
const path = require('path');
|
|
const { setConfig, getConfig } = require('../config/config');
|
|
const config = getConfig();
|
|
|
|
module.exports = {
|
|
development: {
|
|
dialect: 'sqlite',
|
|
storage: config.dbFile,
|
|
logging: console.log,
|
|
define: {
|
|
timestamps: true,
|
|
underscored: true,
|
|
createdAt: 'created_at',
|
|
updatedAt: 'updated_at',
|
|
},
|
|
},
|
|
test: {
|
|
dialect: 'sqlite',
|
|
storage: config.dbFile,
|
|
logging: false,
|
|
define: {
|
|
timestamps: true,
|
|
underscored: true,
|
|
createdAt: 'created_at',
|
|
updatedAt: 'updated_at',
|
|
},
|
|
},
|
|
production: {
|
|
dialect: 'sqlite',
|
|
storage: config.dbFile,
|
|
logging: false,
|
|
define: {
|
|
timestamps: true,
|
|
underscored: true,
|
|
createdAt: 'created_at',
|
|
updatedAt: 'updated_at',
|
|
},
|
|
},
|
|
};
|