From 7aba2b2be7ed8129e98205a58a637c388bccca51 Mon Sep 17 00:00:00 2001 From: Malfurious Date: Sat, 9 Sep 2023 12:09:16 -0400 Subject: acid: remove: Don't rely on YML file Per the previous two commits, the docker-compose.yml file is not needed when running `docker compose down`. Update the cyche-remove script to cope with a lack of such a file. Also per the latest commit, arrange to always call docker compose with the explicit --project-name. Signed-off-by: Malfurious --- acid/cyche-remove | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/acid/cyche-remove b/acid/cyche-remove index 1aa5f36..c988efe 100755 --- a/acid/cyche-remove +++ b/acid/cyche-remove @@ -5,16 +5,11 @@ # Stop the service , which was previously managed by cychedelic, and # remove associated files. -cd "/services/$1" +name=$(cat "/services/$1/.git/previous_slug") +[ -z "$name" ] && name="$1" -file=$(cat '.git/previous_file') -slug=$(cat '.git/previous_slug') -[ -n "$slug" ] && slug="--project-name $slug" - -docker compose $slug --file "$file" down \ - --remove-orphans +docker compose --project-name "$name" down echo "Removing files..." -cd ".." -rm -rf "$1" +rm -rf "/services/$1" echo "Done." -- cgit v1.2.3