From bab23501acdfde7ac155e866d65e436a37e9cce2 Mon Sep 17 00:00:00 2001 From: Jacob Date: Sun, 30 Jun 2024 17:48:29 -0400 Subject: [PATCH] use up and down instead --- src/main.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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())));