Refresh deploy/ and bin/ from the boilerplate at 09e144d (the release split between the distro and Windows, wsl-setup, the server config, USER 1000, python:3.15-slim) with roledesk's facts put back: no frontend stage, desk, plugins and seed copied, the extras passkeys, embeddings and llm, roles as the table the backup and the importer require, bin/pull.sh and bin/worker.sh with their profile commands, and Install Server.md and Install WSL.md as copies in place of the five old deployment docs

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Fable 5.1 committed 2026-10-27 11:11:19 +01:00
1 parent 83e965dfeb
commit a1f281a23a
40 files changed
+2226 -1287

No files matched your search

+12 -56
View File
@@ -1,57 +1,13 @@
<#
.SYNOPSIS
Build a local Docker image from the committed production branch.
.DESCRIPTION
Does not test, promote, push Git branches, use SSH, or start a container.
The image stays local. Use 3-push-image.ps1 to publish it separately.
#>
[CmdletBinding()]
param()
Set-StrictMode -Version Latest
# Step 2, on Windows: build the image from the tree step 1 exported, with wslc.
# Tags <IMAGE>:<sha> and <IMAGE>:latest. Never pushes; 3-push-image.ps1 does.
$ErrorActionPreference = 'Stop'
. "$PSScriptRoot/_common.ps1"
$Image = Setting IMAGE -Required
$Branch = Setting BRANCH 'production'
$Platform = Setting PLATFORM 'linux/amd64'
Push-Location $root
try {
$commit = git rev-parse --verify "$Branch^{commit}"
Assert-Ok 'resolve production commit'
$commit = $commit.Trim()
$sha = (git rev-parse --short $commit).Trim()
Assert-Ok 'resolve image tag'
$tagged = "${Image}:${sha}"
$latest = "${Image}:latest"
# --------------------------------------------------------------- build
# `git archive` to a file and unpack it, rather than piping it. A PowerShell
# pipeline carries text: it would re-encode a tar stream and hand docker a
# corrupted context. Writing the archive out and building from the directory
# keeps the same guarantee -- the context is the committed tree and nothing
# else -- without a byte going through a pipe.
#
# The Dockerfile comes out of that same tree, at deploy/Dockerfile, so the
# recipe is versioned with the code it builds. Docker reads the ignore rules
# from deploy/Dockerfile.dockerignore beside it.
Write-Step "build $tagged"
$ctx = Join-Path ([IO.Path]::GetTempPath()) "$Name-build-$sha"
$tar = "$ctx.tar"
Remove-ReleaseTemp @($ctx, $tar)
New-Item -ItemType Directory -Path $ctx | Out-Null
try {
git archive --format=tar -o $tar $commit; Assert-Ok 'git archive'
tar -xf $tar -C $ctx; Assert-Ok 'tar -xf'
$dockerfile = Join-Path $ctx 'deploy/Dockerfile'
docker build --platform $Platform -f $dockerfile -t $tagged -t $latest $ctx
Assert-Ok 'docker build'
docker image ls $Image --format ' {{.Tag}} {{.Size}}'
} finally {
Remove-ReleaseTemp @($ctx, $tar)
}
Write-Host "Image: $tagged"
} finally { Pop-Location }
. "$PSScriptRoot\_common.ps1"
Assert-Wslc
$sha = Get-ReleaseSha
$context = Join-Path $Release $sha
Write-Host "== build ${Image}:$sha from $context" -ForegroundColor Cyan
# -f is a path wslc opens itself, not one inside the context.
wslc build -t "${Image}:$sha" -t "${Image}:latest" -f "$context\deploy\Dockerfile" $context
if ($LASTEXITCODE -ne 0) { throw "wslc build failed (exit $LASTEXITCODE)" }
wslc image list
Write-Host "Image: ${Image}:$sha"