31 lines
719 B
PowerShell
31 lines
719 B
PowerShell
<#
|
|
.SYNOPSIS
|
|
Stops the mqtt-ingester stack.
|
|
|
|
.DESCRIPTION
|
|
Stops and removes containers and the default network. Volumes
|
|
(timescale-data, mqtt-logs, loki-data) are preserved; use prune.ps1
|
|
to remove them.
|
|
|
|
.PARAMETER Profiles
|
|
Comma-separated compose profiles (must match the ones used at start
|
|
so the same services are addressed).
|
|
#>
|
|
[CmdletBinding()]
|
|
param(
|
|
[string]$Profiles = ""
|
|
)
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
$StackRoot = Split-Path -Parent $PSScriptRoot
|
|
Set-Location $StackRoot
|
|
|
|
$composeArgs = @("compose", "down", "--remove-orphans")
|
|
if ($Profiles) {
|
|
$composeArgs += @("--profile", $Profiles)
|
|
}
|
|
|
|
Write-Host "Stopping stack..." -ForegroundColor Cyan
|
|
docker @composeArgs
|
|
exit $LASTEXITCODE |