Two endpoints over forge's Ollama gpt-oss:120b: /local-optimistic/v1 forge, else cloud gpt-5.4-mini /local-strict/v1 forge, else a clean 503 the caller handles Discovery, not configuration: each instance probes an ordered candidate list (stable DNS name, then the Lounge and future Serenity literals) concurrently but in priority order, so the happy path is one round trip and silicon's move to Serenity needs no rewrite. /healthz runs a real 1-token completion — forge can be up with Ollama stopped. Liveness/readiness are deliberately NOT forge-gated: otherwise k8s would evict the pods during an outage and callers would get a connection failure instead of the promised 503, and Kuma could not tell "forge down" from "router gone". max_tokens/max_completion_tokens are translated per backend: Ollama accepts only the former, gpt-5.4-mini rejects it outright. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
34 lines
1.0 KiB
Bash
Executable File
34 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Build the multi-arch image and push it to the in-estate Gitea registry.
|
|
# Both clusters are arm64-majority (Lounge 12/15, Nidavellir 9/12), so arm64 is
|
|
# not optional. The registry credential is piped from `pass` into docker login's
|
|
# stdin and never appears in a command line, an argument, or the environment.
|
|
set -euo pipefail
|
|
|
|
REGISTRY="git.falkvinge.net"
|
|
OWNER="rick"
|
|
IMAGE="forgeway"
|
|
TAG="${1:-0.1.0}"
|
|
PLATFORMS="linux/amd64,linux/arm64"
|
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
|
|
REF="${REGISTRY}/${OWNER}/${IMAGE}"
|
|
|
|
if ! docker buildx inspect forgeway-builder >/dev/null 2>&1; then
|
|
docker buildx create --name forgeway-builder --driver docker-container --bootstrap
|
|
fi
|
|
|
|
pass git/falkvinge-pat-rwall | docker login "${REGISTRY}" --username "${OWNER}" --password-stdin
|
|
|
|
docker buildx build \
|
|
--builder forgeway-builder \
|
|
--platform "${PLATFORMS}" \
|
|
--tag "${REF}:${TAG}" \
|
|
--tag "${REF}:latest" \
|
|
--push \
|
|
"${ROOT}"
|
|
|
|
echo
|
|
echo "pushed ${REF}:${TAG} (${PLATFORMS})"
|
|
docker buildx imagetools inspect "${REF}:${TAG}" | sed -n '1,40p'
|