diff --git a/src/main.rs b/src/main.rs index 295ffa8..46774ab 100644 --- a/src/main.rs +++ b/src/main.rs @@ -42,7 +42,11 @@ async fn start(paths: &[impl AsRef]) -> 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]) -> 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())));