47 lines
No EOL
1.7 KiB
PowerShell
47 lines
No EOL
1.7 KiB
PowerShell
#!/usr/bin/env pwsh
|
|
Set-StrictMode -Version Latest
|
|
$ErrorActionPreference = 'Stop'
|
|
|
|
if (-not (Test-Path -Path ".\evibes" -PathType Container))
|
|
{
|
|
Write-Host "❌ Please run this script from the project's root (where the 'evibes' directory lives)." -ForegroundColor Red
|
|
exit 1
|
|
}
|
|
|
|
$purple = "`e[38;2;121;101;209m"
|
|
$reset = "`e[0m"
|
|
|
|
$artPath = Join-Path (Split-Path -Parent $MyInvocation.MyCommand.Definition) '..\ASCII_ART_EVIBES'
|
|
if (-not (Test-Path $artPath))
|
|
{
|
|
Write-Host "❌ Could not find ASCII art at $artPath" -ForegroundColor Red
|
|
exit 1
|
|
}
|
|
|
|
$art = Get-Content -Raw -Path $artPath
|
|
$art -split "`r?`n" | ForEach-Object {
|
|
Write-Host "$purple$_$reset"
|
|
}
|
|
|
|
Write-Host "`n by WISELESS TEAM`n" -ForegroundColor Gray
|
|
|
|
Write-Host "Shutting down..." -ForegroundColor Magenta
|
|
docker compose down
|
|
Write-Host "Services were shut down successfully!" -ForegroundColor Green
|
|
|
|
Write-Host "Removing volumes..." -ForegroundColor Magenta
|
|
docker volume remove -f evibes_prometheus-data
|
|
docker volume remove -f evibes_es-data
|
|
Write-Host "Volumes were removed successfully!" -ForegroundColor Green
|
|
|
|
Write-Host "Cleaning up unused Docker data..." -ForegroundColor Magenta
|
|
docker system prune -a -f --volumes
|
|
Write-Host "Unused Docker data cleaned successfully!" -ForegroundColor Green
|
|
|
|
Write-Host "Removing related files..." -ForegroundColor Magenta
|
|
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue ./services_data
|
|
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue ./media
|
|
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue ./static
|
|
Write-Host "Related files removed successfully!" -ForegroundColor Magenta
|
|
|
|
Write-Host "Bye-bye, hope you return later!" -ForegroundColor Red |