Printer & mailer volume path
This commit is contained in:
parent
5199ca62f4
commit
222f7d6249
|
@ -1,7 +1,8 @@
|
|||
require('require-yaml');
|
||||
const fs = require('fs-extra');
|
||||
let configPath = '/config';
|
||||
let nginxConfigPath = '/nginx';
|
||||
const package = require('../package.json');
|
||||
let configPath = `/config/${package.name}`;
|
||||
let nginxConfigPath = '/config/nginx';
|
||||
|
||||
let env = process.env.NODE_ENV ? process.env.NODE_ENV : 'development';
|
||||
|
||||
|
@ -11,19 +12,19 @@ if (env === 'development') {
|
|||
}
|
||||
|
||||
let config = require(`${configPath}/datasources.json`);
|
||||
let configEnvFile = `${__dirname}/config/datasources.${env}.json`;
|
||||
let configEnvFile = `${configPath}/datasources.${env}.json`;
|
||||
|
||||
if (fs.existsSync(configEnvFile))
|
||||
Object.assign(config, require(configEnvFile));
|
||||
|
||||
let proxyConf = require(`${nginxConfigPath}/config.yml`);
|
||||
let proxyEnvFile = `../../nginx/config.${env}.yml`;
|
||||
let proxyEnvFile = `${nginxConfigPath}/config.${env}.yml`;
|
||||
|
||||
if (fs.existsSync(proxyEnvFile))
|
||||
Object.assign(proxyConf, require(proxyEnvFile));
|
||||
|
||||
config.proxy = proxyConf;
|
||||
config.package = require('../package.json');
|
||||
config.package = package;
|
||||
config.env = env;
|
||||
|
||||
module.exports = config;
|
|
@ -1,7 +1,8 @@
|
|||
require('require-yaml');
|
||||
const fs = require('fs-extra');
|
||||
let configPath = '/config';
|
||||
let nginxConfigPath = '/nginx';
|
||||
const package = require('../package.json');
|
||||
let configPath = `/config/${package.name}`;
|
||||
let nginxConfigPath = '/config/nginx';
|
||||
|
||||
let env = process.env.NODE_ENV ? process.env.NODE_ENV : 'development';
|
||||
|
||||
|
@ -11,19 +12,19 @@ if (env === 'development') {
|
|||
}
|
||||
|
||||
let config = require(`${configPath}/datasources.json`);
|
||||
let configEnvFile = `${__dirname}/config/datasources.${env}.json`;
|
||||
let configEnvFile = `${configPath}/datasources.${env}.json`;
|
||||
|
||||
if (fs.existsSync(configEnvFile))
|
||||
Object.assign(config, require(configEnvFile));
|
||||
|
||||
let proxyConf = require(`${nginxConfigPath}/config.yml`);
|
||||
let proxyEnvFile = `../../nginx/config.${env}.yml`;
|
||||
let proxyEnvFile = `${nginxConfigPath}/config.${env}.yml`;
|
||||
|
||||
if (fs.existsSync(proxyEnvFile))
|
||||
Object.assign(proxyConf, require(proxyEnvFile));
|
||||
|
||||
config.proxy = proxyConf;
|
||||
config.package = require('../package.json');
|
||||
config.package = package;
|
||||
config.env = env;
|
||||
|
||||
module.exports = config;
|
Loading…
Reference in New Issue