From 750c60760cfb16451ece11690595ff693bfa992c Mon Sep 17 00:00:00 2001 From: Federico Zambelli Date: Fri, 27 Sep 2024 17:26:03 +0200 Subject: [PATCH] chore: add script to remove unused containers --- devenv.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/devenv.nix b/devenv.nix index b2a3c24..830bbd4 100644 --- a/devenv.nix +++ b/devenv.nix @@ -15,6 +15,7 @@ let black pylint ]; + compose-path = "./tests/docker-compose.yml"; in { name = "sparkle"; @@ -50,6 +51,9 @@ in scripts.down.exec = "devenv processes down"; scripts.down.description = "Stop processes."; + scripts.cleanup.exec = "docker compose -f ${compose-path} rm -vf"; + scripts.cleanup.description = "Remove unused docker containers and volumes."; + scripts.show.exec = '' GREEN="\033[0;32m"; YELLOW="\033[33m"; @@ -103,7 +107,7 @@ in processes = { kafka-test.exec = '' - docker compose -f tests/docker-compose.yml up --build + docker compose -f ${compose-path} up --build ''; };