stop.ps1 789 B

12345678910111213141516171819202122
  1. # ==============================================================================
  2. # lf_mri_platform -- Stop all Docker services
  3. # Usage:
  4. # .\stop.ps1 -- stop containers (keep volumes)
  5. # .\stop.ps1 -Clean -- stop + remove volumes (full reset)
  6. # ==============================================================================
  7. param([switch]$Clean)
  8. $ErrorActionPreference = "Stop"
  9. Write-Host "`n==> Stopping LF-MRI services" -ForegroundColor Cyan
  10. $envFile = Join-Path $PSScriptRoot ".env"
  11. if ($Clean) {
  12. Write-Host " Removing containers AND volumes (full reset)" -ForegroundColor Yellow
  13. & docker compose --env-file $envFile down --volumes
  14. } else {
  15. & docker compose --env-file $envFile down
  16. }
  17. Write-Host " [OK] Services stopped" -ForegroundColor Green