Add 15 and update 3 files
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 47s

This commit is contained in:
j
2025-12-17 18:25:24 +13:00
parent 2222a77070
commit 245837a872
18 changed files with 315 additions and 3 deletions

18
gitea-server/uninstall.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
source "${AGENT_PATH}/common.sh"
_check_required_env_vars "CONTAINER_NAME" "IMAGE_REGISTRY" "IMAGE_REPO" "IMAGE_TAG"
# UNINSTALL SCRIPT
# The uninstall script is required for all templates.
# It is used to uninstall the service from the server.
# IMPORTANT: This script MUST preserve data volumes!
_remove_container "$CONTAINER_NAME" || _die "Failed to remove container ${CONTAINER_NAME}"
_is_container_running "$CONTAINER_NAME" && _die "Couldn't stop existing container"
_is_container_exists "$CONTAINER_NAME" && _die "Couldn't remove existing container"
# Remove the image
docker rmi "$IMAGE_REGISTRY/$IMAGE_REPO:$IMAGE_TAG" || echo "Failed to remove image $IMAGE_REGISTRY/$IMAGE_REPO:$IMAGE_TAG"
echo "Uninstallation of ${CONTAINER_NAME} complete."
echo "Data volume preserved. To remove all data, use destroy.sh"