use up and down instead
This commit is contained in:
@@ -42,7 +42,11 @@ async fn start(paths: &[impl AsRef<Path>]) -> Result<(), MyError> {
|
||||
.into_iter()
|
||||
.map(|path| {
|
||||
let mut command = tokio::process::Command::new("docker");
|
||||
command.arg("compose").arg("start").current_dir(path);
|
||||
command
|
||||
.arg("compose")
|
||||
.arg("up")
|
||||
.arg("--detach")
|
||||
.current_dir(path);
|
||||
(path, command)
|
||||
})
|
||||
.map(|(path, mut command)| (path, tokio::spawn(command.output())));
|
||||
@@ -66,7 +70,7 @@ async fn stop(paths: &[impl AsRef<Path>]) -> Result<(), MyError> {
|
||||
.into_iter()
|
||||
.map(|path| {
|
||||
let mut command = tokio::process::Command::new("docker");
|
||||
command.arg("compose").arg("stop").current_dir(path);
|
||||
command.arg("compose").arg("down").current_dir(path);
|
||||
(path, command)
|
||||
})
|
||||
.map(|(path, mut command)| (path, tokio::spawn(command.output())));
|
||||
|
Reference in New Issue
Block a user