totvs-dtsenv-cli
Version:
TOTVS Datasul Environment Command Line
22 lines (21 loc) • 872 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const CommandUtils_1 = __importDefault(require("../utils/CommandUtils"));
class UpCommand {
constructor(commander) {
commander.command('up')
.description('Monta, recria e inicia um ambiente Datasul configurado.')
.action(UpCommand.actionCommand);
UpCommand.program = commander;
}
static actionCommand() {
console.log("Montando o ambiente...");
/** Montando ambiente de gerenciamento */
let cmd = CommandUtils_1.default.execCommandSync('docker-compose', ['up', '-d']);
console.log("Ambiente montado com sucesso.");
}
}
exports.default = UpCommand;