20 lines
480 B
PowerShell
20 lines
480 B
PowerShell
<#
|
|
.SYNOPSIS
|
|
Stop the InboxIntel stack. Use -Volumes to also drop the database + key data.
|
|
.EXAMPLE
|
|
./deploy/down.ps1
|
|
./deploy/down.ps1 -Volumes
|
|
#>
|
|
param([switch]$Volumes)
|
|
|
|
$ErrorActionPreference = 'Stop'
|
|
$root = Split-Path -Parent $PSScriptRoot
|
|
$envFile = Join-Path $PSScriptRoot '.env'
|
|
|
|
$composeArgs = @('compose', '--env-file', $envFile, 'down')
|
|
if ($Volumes) { $composeArgs += '--volumes' }
|
|
|
|
Push-Location $root
|
|
try { & docker @composeArgs }
|
|
finally { Pop-Location }
|