2019-03-02 15:19:08 +00:00
|
|
|
import DockerCompose from "./DockerCompose";
|
|
|
|
|
|
|
|
class DockerEnvironment {
|
|
|
|
private dockerCompose: DockerCompose;
|
|
|
|
|
|
|
|
constructor(composeFiles: string[]) {
|
|
|
|
this.dockerCompose = new DockerCompose(composeFiles);
|
|
|
|
}
|
|
|
|
|
|
|
|
async start() {
|
|
|
|
await this.dockerCompose.up();
|
|
|
|
}
|
|
|
|
|
2019-03-24 18:28:32 +00:00
|
|
|
async logs(service: string) {
|
|
|
|
await this.dockerCompose.logs(service);
|
|
|
|
}
|
|
|
|
|
2019-03-02 15:19:08 +00:00
|
|
|
async stop() {
|
|
|
|
await this.dockerCompose.down();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default DockerEnvironment;
|