schon/scripts/Windows/uninstall.ps1
Egor fureunoir Gorbunov bf6b9f4424 Features: 1) Add backup_task to manage database and media backups; 2) Introduce periodic scheduling for backup_task via Celery Beat;
Fixes: 1) Apply `--omit` filter for test coverage reports to exclude unnecessary files; 2) Replace `services_data` volume mounts with named Docker volumes for consistency and cleanup (e.g., `postgres-data`, `redis-data`);

Extra: 1) Remove `services_data` from `.gitignore`, Docker-related cleanup in uninstall scripts; 2) Simplified related files removal scripts for Unix and Windows; 3) Minor adjustments in documentation comments.
2025-11-13 17:14:00 +03:00

39 lines
No EOL
1.2 KiB
PowerShell

Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
.\scripts\Windows\starter.ps1
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
Write-Host "Shutting down..." -ForegroundColor Magenta
docker compose down
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
Write-Host "Services were shut down successfully!" -ForegroundColor Green
Write-Host "Removing volumes..." -ForegroundColor Magenta
docker volume remove -f evibes_prometheus-data
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
docker volume remove -f evibes_es-data
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
Write-Host "Volumes were removed successfully!" -ForegroundColor Green
Write-Host "Cleaning up unused Docker data..." -ForegroundColor Magenta
docker system prune -a -f --volumes
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
Write-Host "Unused Docker data cleaned successfully!" -ForegroundColor Green
Write-Host "Removing related files..." -ForegroundColor Magenta
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue ./media
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue ./static
Write-Host "Related files removed successfully!" -ForegroundColor Green
Write-Host "Bye-bye, hope you return later!" -ForegroundColor Red