Remove mailcatcher container before ckan-compose up

Added command to remove mailcatcher container before starting ckan-compose.
This commit is contained in:
Abdur Rahman 2025-09-04 06:48:11 +00:00 committed by GitHub
parent 4aab934857
commit bc0910b4cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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."));