WIP Multi-tenant architecture.

This commit is contained in:
Ahmed Bouhuolia
2020-04-21 22:47:27 +02:00
parent 4e0d3feebe
commit 8f588ffc51
64 changed files with 812 additions and 447 deletions

View File

@@ -1,16 +1,19 @@
import knexManager from 'knex-db-manager';
import knexfile from '@/../knexfile';
import knexfile from '@/../config/systemKnexfile';
import config from '@/../config/config';
const config = knexfile[process.env.NODE_ENV];
const knexConfig = knexfile[process.env.NODE_ENV];
console.log({
superUser: config.manager.superUser,
superPassword: config.manager.superPassword,
});
const dbManager = knexManager.databaseManagerFactory({
knex: config,
knex: knexConfig,
dbManager: {
// db manager related configuration
collate: [],
superUser: 'root',
superPassword: 'root',
// populatePathPattern: 'data/**/*.js', // glob format for searching seeds
superUser: config.manager.superUser,
superPassword: config.manager.superPassword,
},
});