summaryrefslogtreecommitdiff
path: root/deploy/cross-build.sh
diff options
context:
space:
mode:
authorAnders Betts <anders.betts@gmail.com>2026-09-23 11:36:11 +0200
committerAnders Betts <anders.betts@gmail.com>2026-09-23 11:36:11 +0200
commit1abb7649b930d35d1f5a76fd72856659b1ee8275 (patch)
tree50d1d3dd905056b75749e22a58e7247e4a4bb0e2 /deploy/cross-build.sh
parent71a702f375750829c634b552217c9925d549828b (diff)
downloadbokf-0.1.69.tar.gz
bokf-0.1.69.zip
web: bokftui in the browser (ttyd + bokfweb login gate); per-user login limitv0.1.69
New image bokf-web (Dockerfile target "web", compose service "web" on 127.0.0.1:8790): Caddy routing with forward_auth, the bokfweb login gate (C, authenticates with bokfd's session.open, per-address limit, cookie + terminal handle, one login handed to the TUI via /redeem) and ttyd running bokftui in web mode in an isolated throwaway HOME. TLS stays with the host's reverse proxy. BOKF_WEB=1 blocks every local file and viewer path in the TUI. bokfd's login limiter is now per user name instead of one global counter (5 wrong guesses from anyone locked out everybody), and a full counter table no longer disables it. The cross build and deploy.sh build and ship both images. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'deploy/cross-build.sh')
-rw-r--r--deploy/cross-build.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/deploy/cross-build.sh b/deploy/cross-build.sh
index 19d07b7..54a2929 100644
--- a/deploy/cross-build.sh
+++ b/deploy/cross-build.sh
@@ -1,16 +1,20 @@
#!/bin/sh
-# Cross-compile the static aarch64 backend binaries (bokfd, bokfctl).
+# Cross-compile the static aarch64 binaries: bokfd, bokfctl and, for the
+# web image, bokftui and bokfweb.
# Expects the source read-only at /src, writes the binaries to /out and takes
# the version from $VERSION. Run through deploy/Dockerfile.cross. OpenSSL and
# glibc are linked statically, so the Alpine runtime image needs no shared
# libraries (the kernel ABI is all that matters).
set -eu
-make -C /src -j"$(nproc)" BUILD=/tmp/build backend \
+# ncursesw needs its tinfo half spelled out for a static link
+make -C /src -j"$(nproc)" BUILD=/tmp/build \
+ backend /tmp/build/bokftui /tmp/build/bokfweb \
CC=aarch64-linux-gnu-gcc \
CFLAGS="-O2 -g -static -L/usr/lib/aarch64-linux-gnu" \
- SSL_LIBS="-l:libssl.a -l:libcrypto.a -ldl -lpthread" \
+ SSL_LIBS="-l:libssl.a -l:libcrypto.a -l:libtinfo.a -ldl -lpthread" \
VERSION="${VERSION:-0.1.0-dev}"
mkdir -p /out
-cp /tmp/build/bokfd /tmp/build/bokfctl /out/
+cp /tmp/build/bokfd /tmp/build/bokfctl /tmp/build/bokftui \
+ /tmp/build/bokfweb /out/