mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 06:10:31 +00:00
WIP Multi-tenant architecture.
This commit is contained in:
25
server/config/config.js
Normal file
25
server/config/config.js
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
module.exports = {
|
||||
system: {
|
||||
db_client: 'mysql',
|
||||
db_host: '127.0.0.1',
|
||||
db_user: 'root',
|
||||
db_password: '123123123',
|
||||
db_name: 'bigcapital_system',
|
||||
migrations_dir: '../src/system/migrations',
|
||||
},
|
||||
tenant: {
|
||||
db_client: 'mysql',
|
||||
db_name_prefix: 'bigcapital_tenant_',
|
||||
db_host: '127.0.0.1',
|
||||
db_user: 'root',
|
||||
db_password: '123123123',
|
||||
charset: 'utf8',
|
||||
migrations_dir: 'src/database/migrations',
|
||||
seeds_dir: 'src/database/seeds',
|
||||
},
|
||||
manager: {
|
||||
superUser: 'root',
|
||||
superPassword: '123123123',
|
||||
},
|
||||
};
|
||||
20
server/config/systemKnexfile.js
Normal file
20
server/config/systemKnexfile.js
Normal file
@@ -0,0 +1,20 @@
|
||||
const config = require('./config');
|
||||
|
||||
const configEnv = {
|
||||
client: config.system.db_client,
|
||||
connection: {
|
||||
host: config.system.db_host,
|
||||
user: config.system.db_user,
|
||||
password: config.system.db_password,
|
||||
database: config.system.db_name,
|
||||
charset: 'utf8',
|
||||
},
|
||||
migrations: {
|
||||
directory: config.system.migrations_dir,
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
development: configEnv,
|
||||
production: configEnv,
|
||||
};
|
||||
Reference in New Issue
Block a user