From bc0910b4cd8603cdd5a58d0707911a6723abfa60 Mon Sep 17 00:00:00 2001 From: Abdur Rahman Date: Thu, 4 Sep 2025 06:48:11 +0000 Subject: [PATCH] Remove mailcatcher container before ckan-compose up Added command to remove mailcatcher container before starting ckan-compose. --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 8ec4746..919b6c6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -210,7 +210,8 @@ fn main() -> Result<()> { std::fs::write(format!("/home/{username}/ckan-compose/.env"), env_data)?; cmd!(sh, "sudo ../ahoy down").run()?; cmd!(sh, "sudo docker system prune -f").run()?; - cmd!(sh, "sudo ../ahoy up").run()?; + // Replace the `sudo ../ahoy up` line with: + cmd!(sh, "sudo docker container rm -f ckan-compose_mailcatcher_1").run().ok(); // ok() to ignore if it doesn't exist cmd!(sh, "sudo ../ahoy up").run()?; println!("{}", success_text("✅ 5. Successfully ran ckan-compose."));