This commit is contained in:
Your Name
2025-05-03 23:18:52 +12:00
parent 2fe7d4c3d9
commit 3d9b1fa6d2
48 changed files with 59 additions and 199 deletions

View File

@ -1,21 +1,13 @@
#!/bin/bash
source "${AGENT_PATH}/_common.sh"
check_required_env_vars "CONTAINER_NAME"
# Nginx Example Uninstall Script
# Load service environment variables
source ./service.env
_check_required_env_vars "CONTAINER_NAME" "IMAGE_REGISTRY" "IMAGE_REPO" "IMAGE_TAG" "LOCAL_DATA_FOLDER"
echo "Uninstalling service ${CONTAINER_NAME}..."
_remove_container $CONTAINER_NAME || _die "Failed to remove container ${CONTAINER_NAME}"
if _is_container_running $CONTAINER_NAME; then _die "Couldn't stop existing container"; fi
if _is_container_exists $CONTAINER_NAME; then _die "Couldn't remove existing container"; fi
# Optional: Remove image?
# echo "Removing image ${IMAGE_REGISTRY}/${IMAGE_REPO}:${IMAGE_TAG}..."
# docker rmi "$IMAGE_REGISTRY/$IMAGE_REPO:$IMAGE_TAG" || echo "Warning: Failed to remove image (might be in use)"
echo "Service ${CONTAINER_NAME} uninstalled."
# Note: This does NOT remove the local data folder. Use nuke.sh for that.
echo "Note: This does NOT remove the local data folder. Use nuke.sh for that."