build: add production-parity staging environment on Docker
Layer a staging overlay (docker-compose.staging.yml) on the base compose file: same Linux images and Production runtime as prod, differing only in the dev banner, capped sync, shifted ports (18080/18081), and an isolated project namespace so it never touches prod data. Wire -Staging into deploy/up.ps1 and deploy/down.ps1, add .env.staging.example, and track that template in git. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+13
-4
@@ -5,13 +5,22 @@
|
||||
./deploy/down.ps1
|
||||
./deploy/down.ps1 -Volumes
|
||||
#>
|
||||
param([switch]$Volumes)
|
||||
param([switch]$Volumes, [switch]$Staging)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$root = Split-Path -Parent $PSScriptRoot
|
||||
$envFile = Join-Path $PSScriptRoot '.env'
|
||||
$root = Split-Path -Parent $PSScriptRoot
|
||||
|
||||
$composeArgs = @('compose', '--env-file', $envFile, 'down')
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user