Files
mtusi2026lab2/scripts/restart.ps1

13 lines
380 B
PowerShell

$ErrorActionPreference = "Stop"
$repo = Split-Path -Parent $PSScriptRoot
Set-Location $repo
if (-not (Test-Path ".env")) {
throw "Copy .env.example to .env and configure local credentials first."
}
docker compose --env-file .env up -d --force-recreate --build postgres redis api
if ($LASTEXITCODE -ne 0) { throw "Compose restart failed" }
docker compose --env-file .env ps