totvs-dtsenv-cli
Version:
TOTVS Datasul Environment Command Line
27 lines (18 loc) • 648 B
text/typescript
import * as program from "commander";
import * as fs from "fs";
import CommandUtils from "../utils/CommandUtils";
export default class UpCommand {
static program : any
constructor(commander: any) {
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.execCommandSync('docker-compose', ['up','-d'])
console.log("Ambiente montado com sucesso.")
}
}