feat(uninstall): enhance volume removal for additional data types
add handling for postgres-data, redis-data, static-data, and media-data volumes in both Windows and Unix uninstall scripts. Ensures errors are logged if volume removal fails.
This commit is contained in:
parent
adec5503b2
commit
c3b4637044
2 changed files with 20 additions and 0 deletions
|
|
@ -13,6 +13,10 @@ log_success "Services were shut down successfully!"
|
||||||
|
|
||||||
# Remove volumes
|
# Remove volumes
|
||||||
log_step "Removing volumes..."
|
log_step "Removing volumes..."
|
||||||
|
docker volume remove -f schon_postgres-data || log_warning "Failed to remove postgres-data volume"
|
||||||
|
docker volume remove -f schon_redis-data || log_warning "Failed to remove redis-data volume"
|
||||||
|
docker volume remove -f schon_static-data || log_warning "Failed to remove static-data volume"
|
||||||
|
docker volume remove -f schon_media-data || log_warning "Failed to remove media-data volume"
|
||||||
docker volume rm -f schon_prometheus-data || log_warning "Failed to remove prometheus-data volume"
|
docker volume rm -f schon_prometheus-data || log_warning "Failed to remove prometheus-data volume"
|
||||||
docker volume rm -f schon_es-data || log_warning "Failed to remove es-data volume"
|
docker volume rm -f schon_es-data || log_warning "Failed to remove es-data volume"
|
||||||
log_success "Volumes were removed successfully!"
|
log_success "Volumes were removed successfully!"
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,22 @@ Write-Success "Services were shut down successfully!"
|
||||||
|
|
||||||
# Remove volumes
|
# Remove volumes
|
||||||
Write-Step "Removing volumes..."
|
Write-Step "Removing volumes..."
|
||||||
|
docker volume remove -f schon_postgres-data
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
Write-Warning-Custom "Failed to remove postgres-data volume"
|
||||||
|
}
|
||||||
|
docker volume remove -f schon_redis-data
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
Write-Warning-Custom "Failed to remove redis-data volume"
|
||||||
|
}
|
||||||
|
docker volume remove -f schon_static-data
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
Write-Warning-Custom "Failed to remove static-data volume"
|
||||||
|
}
|
||||||
|
docker volume remove -f schon_media-data
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
Write-Warning-Custom "Failed to remove media-data volume"
|
||||||
|
}
|
||||||
docker volume remove -f schon_prometheus-data
|
docker volume remove -f schon_prometheus-data
|
||||||
if ($LASTEXITCODE -ne 0) {
|
if ($LASTEXITCODE -ne 0) {
|
||||||
Write-Warning-Custom "Failed to remove prometheus-data volume"
|
Write-Warning-Custom "Failed to remove prometheus-data volume"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue