fix(core.gbapp): Self-replication on Azure
This commit is contained in:
parent
f64cc4c1a9
commit
8850370be4
4 changed files with 210 additions and 632 deletions
836
package-lock.json
generated
836
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -86,6 +86,7 @@
|
|||
"ms-rest-js": "1.0.1",
|
||||
"nexmo": "2.4.1",
|
||||
"ngrok": "3.1.1",
|
||||
"npm": "6.9.0",
|
||||
"nyc": "14.1.1",
|
||||
"opn": "6.0.0",
|
||||
"pragmatismo-io-framework": "1.0.19",
|
||||
|
|
|
@ -60,6 +60,7 @@ import { CognitiveServicesAccount } from 'azure-arm-cognitiveservices/lib/models
|
|||
import urlJoin = require('url-join');
|
||||
const iconUrl = 'https://github.com/pragmatismo-io/BotServer/blob/master/docs/images/generalbots-logo-squared.png';
|
||||
const publicIp = require('public-ip');
|
||||
const WebSiteResponseTimeout = 900;
|
||||
|
||||
/**
|
||||
* Deployer for Microsoft cloud.
|
||||
|
@ -724,6 +725,7 @@ export class AzureDeployerService implements IGBInstallationDeployer {
|
|||
serverFarmId: serverFarmId,
|
||||
siteConfig: {
|
||||
appSettings: [
|
||||
{ name: 'WEBSITES_CONTAINER_START_TIME_LIMIT', value: webSiteResponseTimeout },
|
||||
{ name: 'WEBSITE_NODE_DEFAULT_VERSION', value: GBAdminService.getNodeVersion() },
|
||||
{ name: 'ADDITIONAL_DEPLOY_PATH', value: `` },
|
||||
{ name: 'ADMIN_PASS', value: `${instance.adminPass}` },
|
||||
|
|
|
@ -67,6 +67,7 @@ import { GBWhatsappPackage } from '../../whatsapp.gblib';
|
|||
import { Messages } from '../strings';
|
||||
import { GBAdminPackage } from './../../admin.gbapp/index';
|
||||
import { GBDeployer } from './GBDeployer';
|
||||
import { GBConfigService } from './GBConfigService';
|
||||
|
||||
/**
|
||||
* Minimal service layer for a bot.
|
||||
|
@ -232,7 +233,7 @@ export class GBMinService {
|
|||
private async sendInstanceToClient(req, bootInstance: IGBInstance, res: any, webchatToken: any) {
|
||||
let botId = req.params.botId;
|
||||
if (botId === '[default]') {
|
||||
botId = bootInstance.botId;
|
||||
botId = GBConfigService.get('BOT_ID');
|
||||
}
|
||||
const instance = await this.core.loadInstance(botId);
|
||||
if (instance !== null) {
|
||||
|
|
Loading…
Add table
Reference in a new issue