Files
budget/deploy.ps1
T
Spencer Twaddle b82b3939ce Improve deploy script reliability
Switch from explicit down/up to --pull always to avoid unnecessary network
teardown. Add exit code check on SSH command and a post-deploy status check.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 22:22:10 -05:00

16 lines
518 B
PowerShell

$image = "docker.stwaddle.com/budget:latest"
docker build -t $image .
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
docker push $image
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
ssh stwaddle_com "cd stwaddlecom && docker compose up -d --pull always budget"
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
Write-Host "Waiting for container to start..."
Start-Sleep -Seconds 8
ssh stwaddle_com "docker inspect --format='{{.State.Status}}' stwaddlecom-budget-1"
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }