diff options
Diffstat (limited to 'acid/cyche-remove')
-rwxr-xr-x | acid/cyche-remove | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/acid/cyche-remove b/acid/cyche-remove new file mode 100755 index 0000000..1aa5f36 --- /dev/null +++ b/acid/cyche-remove @@ -0,0 +1,20 @@ +#!/bin/bash + +# cyche-remove <name> +# +# Stop the service <name>, which was previously managed by cychedelic, and +# remove associated files. + +cd "/services/$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 + +echo "Removing files..." +cd ".." +rm -rf "$1" +echo "Done." |