All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 49s
21 lines
624 B
Bash
Executable File
21 lines
624 B
Bash
Executable File
#!/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 PUID PGID TZ IMAGE_TAG DB_NAME DB_USER DB_PASS
|
|
|
|
echo "WARNING: This will PERMANENTLY DELETE all data for ${CONTAINER_NAME}"
|
|
echo "This includes all wiki pages, users, database, and configuration!"
|
|
|
|
cd "$SCRIPT_DIR"
|
|
|
|
# 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."
|