fix(core.gbapp): Self-replication on Azure
This commit is contained in:
parent
8850370be4
commit
25091573a0
3 changed files with 6 additions and 1 deletions
|
@ -221,6 +221,7 @@ export class GBCoreService implements IGBCoreService {
|
|||
public async writeEnv(instance: IGBInstance) {
|
||||
const env = `ADDITIONAL_DEPLOY_PATH=
|
||||
ADMIN_PASS=${instance.adminPass}
|
||||
BOT_ID=${instance.botId}
|
||||
CLOUD_SUBSCRIPTIONID=${instance.cloudSubscriptionId}
|
||||
CLOUD_LOCATION=${instance.cloudLocation}
|
||||
CLOUD_GROUP=${instance.botId}
|
||||
|
|
|
@ -40,6 +40,7 @@ import { IGBCoreService, IGBInstance } from 'botlib';
|
|||
import fs = require('fs');
|
||||
import urlJoin = require('url-join');
|
||||
import { GuaribasInstance } from '../models/GBModel';
|
||||
import { GBConfigService } from './GBConfigService';
|
||||
|
||||
/**
|
||||
* Handles the importing of packages.
|
||||
|
@ -56,6 +57,9 @@ export class GBImporter {
|
|||
if (botId === undefined) {
|
||||
botId = packageJson.botId;
|
||||
}
|
||||
if (botId === undefined) {
|
||||
botId = GBConfigService.get('BOT_ID');
|
||||
}
|
||||
const instance = await this.core.loadInstance(botId);
|
||||
|
||||
return await this.createOrUpdateInstanceInternal(instance, botId, localPath, packageJson);
|
||||
|
|
|
@ -232,7 +232,7 @@ export class GBMinService {
|
|||
*/
|
||||
private async sendInstanceToClient(req, bootInstance: IGBInstance, res: any, webchatToken: any) {
|
||||
let botId = req.params.botId;
|
||||
if (botId === '[default]') {
|
||||
if (botId === '[default]'|| botId === undefined) {
|
||||
botId = GBConfigService.get('BOT_ID');
|
||||
}
|
||||
const instance = await this.core.loadInstance(botId);
|
||||
|
|
Loading…
Add table
Reference in a new issue