Add dev/prod environments with TrueNAS Docker production deploy.
Split PostgreSQL into gallery_dev and gallery_prod, add Docker/Gitea deploy tooling, SMB image sync, pgAdmin split script, dev:web on Keenetic :5173, and operator docs. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
02d238b043
commit
2edf577faf
@@ -0,0 +1,36 @@
|
||||
# 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
|
||||
Reference in New Issue
Block a user