summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2023-09-09 12:09:16 -0400
committerMalfurious <m@lfurio.us>2023-09-10 04:47:40 -0400
commit7aba2b2be7ed8129e98205a58a637c388bccca51 (patch)
tree071b83da8f2484cd64bcdb0e0a7c3ca831d7c6d2
parent8102d3dfa6914730e4d2aae26cd33c53c276da11 (diff)
downloadcychedelic-7aba2b2be7ed8129e98205a58a637c388bccca51.tar.gz
cychedelic-7aba2b2be7ed8129e98205a58a637c388bccca51.zip
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 <m@lfurio.us>
-rwxr-xr-xacid/cyche-remove13
1 files 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 <name>, 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."