Files
Inboxintel/deploy/down.ps1
cesnimda ae8e6b672e
CI / backend (push) Successful in 1m14s
CI / frontend (push) Successful in 28s
Security / secrets (push) Successful in 6s
Security / dependencies (push) Successful in 1m14s
Deploy Staging / deploy (push) Failing after 43s
Git workflow, environments & CI/CD pipeline (#1)
2026-07-01 11:44:34 +02:00

29 lines
798 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, [switch]$Staging)
$ErrorActionPreference = 'Stop'
$root = Split-Path -Parent $PSScriptRoot
if ($Staging) {
$envFile = Join-Path $PSScriptRoot '.env.staging'
$composeFiles = @('-f', 'docker-compose.yml', '-f', 'docker-compose.staging.yml')
$project = @('-p', 'inboxintel-staging')
} else {
$envFile = Join-Path $PSScriptRoot '.env'
$composeFiles = @()
$project = @()
}
$composeArgs = @('compose') + $project + @('--env-file', $envFile) + $composeFiles + @('down')
if ($Volumes) { $composeArgs += '--volumes' }
Push-Location $root
try { & docker @composeArgs }
finally { Pop-Location }