mirror of
https://github.com/chatopera/cosin.git
synced 2025-08-01 16:38:02 +08:00
Merge branch 'develop' of github.com:chatopera/cosin into develop
This commit is contained in:
commit
3062dfa6c1
2
cc-switch/.gitignore
vendored
2
cc-switch/.gitignore
vendored
@ -10,5 +10,5 @@ sftp-config.json
|
|||||||
.vscode
|
.vscode
|
||||||
.idea/
|
.idea/
|
||||||
.composer.phar
|
.composer.phar
|
||||||
app/config/dev.env.js
|
app/config/dev.env
|
||||||
ax.js
|
ax.js
|
||||||
|
7
cc-switch/app/config/dev.env.sample
Normal file
7
cc-switch/app/config/dev.env.sample
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
PBX_CHANNEL_ID=bxzq
|
||||||
|
FREESWITCH_HOST=freeswitch
|
||||||
|
REDIS_HOST=redis
|
||||||
|
MINIO_END_POINT=mini
|
||||||
|
MINIO_ACCESS_KEY=key
|
||||||
|
MINIO_SECRET_KEY=secret
|
@ -1,8 +0,0 @@
|
|||||||
module.exports = exports = {
|
|
||||||
PBX_CHANNEL_ID: 'bxzq',
|
|
||||||
FREESWITCH_HOST: 'freeswitch',
|
|
||||||
REDIS_HOST: 'redis',
|
|
||||||
MINIO_END_POINT: 'mini',
|
|
||||||
MINIO_ACCESS_KEY: 'key',
|
|
||||||
MINIO_SECRET_KEY: 'secret',
|
|
||||||
};
|
|
@ -1,4 +1,6 @@
|
|||||||
const _ = require('lodash');
|
const fs = require('fs');
|
||||||
|
const path = require('path');
|
||||||
|
const dotenv = require('dotenv');
|
||||||
|
|
||||||
const PBX_CHANNEL_ID = 'test';
|
const PBX_CHANNEL_ID = 'test';
|
||||||
|
|
||||||
@ -6,14 +8,9 @@ const FREESWITCH_HOST = 'localhost';
|
|||||||
const FREESWITCH_PORT = 8021;
|
const FREESWITCH_PORT = 8021;
|
||||||
const FREESWITCH_MAX_CHANNEL = 5;
|
const FREESWITCH_MAX_CHANNEL = 5;
|
||||||
|
|
||||||
const ACTIVEMQ_HOST = 'localhost';
|
const MINIO_END_POINT = 'localhost';
|
||||||
const ACTIVEMQ_PORT = 61613;
|
const MINIO_ACCESS_KEY = 'key';
|
||||||
const ACTIVEMQ_USER = null;
|
const MINIO_SECRET_KEY = 'secret';
|
||||||
const ACTIVEMQ_PASS = null;
|
|
||||||
|
|
||||||
const MINIO_END_POINT = '';
|
|
||||||
const MINIO_ACCESS_KEY = '';
|
|
||||||
const MINIO_SECRET_KEY = '';
|
|
||||||
|
|
||||||
const REDIS_HOST = 'localhost';
|
const REDIS_HOST = 'localhost';
|
||||||
const REDIS_PORT = 6379;
|
const REDIS_PORT = 6379;
|
||||||
@ -23,10 +20,6 @@ const config = {
|
|||||||
FREESWITCH_HOST,
|
FREESWITCH_HOST,
|
||||||
FREESWITCH_PORT,
|
FREESWITCH_PORT,
|
||||||
FREESWITCH_MAX_CHANNEL,
|
FREESWITCH_MAX_CHANNEL,
|
||||||
ACTIVEMQ_HOST,
|
|
||||||
ACTIVEMQ_PORT,
|
|
||||||
ACTIVEMQ_USER,
|
|
||||||
ACTIVEMQ_PASS,
|
|
||||||
REDIS_HOST,
|
REDIS_HOST,
|
||||||
REDIS_PORT,
|
REDIS_PORT,
|
||||||
MINIO_END_POINT,
|
MINIO_END_POINT,
|
||||||
@ -34,16 +27,13 @@ const config = {
|
|||||||
MINIO_SECRET_KEY,
|
MINIO_SECRET_KEY,
|
||||||
};
|
};
|
||||||
|
|
||||||
let env = {};
|
let envFile = path.join(__dirname, 'dev.env');
|
||||||
|
if (fs.existsSync(envFile)) {
|
||||||
try {
|
dotenv.config({ path: envFile });
|
||||||
env = require('./dev.env.js');
|
}
|
||||||
} catch (e) {}
|
|
||||||
|
|
||||||
_.merge(env, process.env);
|
|
||||||
|
|
||||||
for (let key in config) {
|
for (let key in config) {
|
||||||
let value = env[key];
|
let value = process.env[key];
|
||||||
if (value) {
|
if (value) {
|
||||||
config[key] = value;
|
config[key] = value;
|
||||||
}
|
}
|
||||||
|
1959
cc-switch/app/package-lock.json
generated
1959
cc-switch/app/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -12,6 +12,7 @@
|
|||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"debug": "^3.1.0",
|
"debug": "^3.1.0",
|
||||||
|
"dotenv": "^6.0.0",
|
||||||
"ioredis": "^4.0.0",
|
"ioredis": "^4.0.0",
|
||||||
"lodash": "^4.17.10",
|
"lodash": "^4.17.10",
|
||||||
"minio": "^7.0.0",
|
"minio": "^7.0.0",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user