Open saltydk opened 1 year ago
Maybe have two commands, mimicking apt
behavior.
sb remove foo
sb purge foo
/opt/foo
etc)When the command is issued, print a rundown of what exactly will be removed, awaiting confirmation.
I feel like we should leave the image cleanup to the docker role.
Or add a short hand command for it with sb maybe to pair with this.
Removal would just remove the container and optionally remove the dns record tied to the machine (unsure if we should mess with dns) Purge would remove the container and prompt the user if any of the found opt folders (common ones excluded) should be removed as well. Prompt to confirm any data removal.
Suggested template for looking up the folders
If we decide to manage the removal of dns records we could add additional label(s) to specify which are tied to the container instead of hoping traefik labels will stay in the same format.
As currently constructed this would be scoped to container based apps and multiple containers in the same app would still need some kind of label pairing (fairly easy to add going forward) to link them together for this tool to more easily find them in one go. Removal of the paired containers could be optional.