add seafile
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 7s

This commit is contained in:
j
2025-12-29 12:53:02 +13:00
parent 53e34ad6f3
commit 2053e78ee0
14 changed files with 352 additions and 0 deletions

20
seafile/uninstall.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
source "${AGENT_PATH}/common.sh"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
_check_required_env_vars "CONTAINER_NAME" "DATA_PATH"
# Export variables for docker compose
export CONTAINER_NAME DATA_PATH HTTP_PORT IMAGE_REGISTRY IMAGE_REPO IMAGE_TAG
export MYSQL_ROOT_PASSWORD DB_PASSWORD SEAFILE_ADMIN_EMAIL SEAFILE_ADMIN_PASSWORD
export SEAFILE_SERVER_HOSTNAME SEAFILE_SERVER_PROTOCOL TZ
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
# Stop and remove containers (but preserve volumes/data)
docker compose down || _die "Failed to stop containers"
# Remove images
docker compose config --images | xargs -r docker rmi 2>/dev/null || true
echo "Uninstallation of ${CONTAINER_NAME} complete."
echo "Data preserved in ${DATA_PATH}. To remove all data, use destroy.sh"