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:
22
seafile/destroy.sh
Executable file
22
seafile/destroy.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/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
|
||||
|
||||
echo "WARNING: This will PERMANENTLY DELETE all data for ${CONTAINER_NAME}"
|
||||
echo "This includes all files, database, and configuration!"
|
||||
|
||||
cd "$SCRIPT_DIR" || _die "Failed to change to script directory"
|
||||
|
||||
# Stop and remove containers
|
||||
docker compose down -v 2>/dev/null || true
|
||||
|
||||
# Remove data directory
|
||||
rm -rf "${DATA_PATH}"
|
||||
|
||||
echo "Destroyed ${CONTAINER_NAME} and all data."
|
||||
Reference in New Issue
Block a user