add seafile
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 7s
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 7s
This commit is contained in:
20
seafile/uninstall.sh
Executable file
20
seafile/uninstall.sh
Executable 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"
|
||||
Reference in New Issue
Block a user