deploy: one-command scripts to build+run from deploy/.env
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<#
|
||||
.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 }
|
||||
Reference in New Issue
Block a user