# Build and push the production web image to Gitea over LAN (fast path). param( [string]$Tag = "latest", [switch]$SkipHosts, [switch]$SkipBuild ) $ErrorActionPreference = "Stop" $Registry = "gitea.mysuperlab.netcraze.pro" $Image = "$Registry/danilka/gallery-web" function Test-DockerRunning { docker info 2>&1 | Out-Null return $LASTEXITCODE -eq 0 } Write-Host "=== Build + LAN push to Gitea ===" -ForegroundColor Cyan if (-not (Test-DockerRunning)) { Write-Host "Docker is not running. Start Docker Desktop and retry." -ForegroundColor Red exit 1 } if (-not $SkipBuild) { Write-Host "" Write-Host "Building ${Image}:${Tag} ..." docker build -f infra/docker/Dockerfile -t "${Image}:${Tag}" . if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } Write-Host "Build complete." -ForegroundColor Green } else { Write-Host "Skipping build (-SkipBuild)." -ForegroundColor Yellow } Write-Host "" & "$PSScriptRoot/push-lan.ps1" -Tag $Tag -SkipHosts:$SkipHosts exit $LASTEXITCODE