From 1abb7649b930d35d1f5a76fd72856659b1ee8275 Mon Sep 17 00:00:00 2001 From: Anders Betts Date: Wed, 23 Sep 2026 11:36:11 +0200 Subject: web: bokftui in the browser (ttyd + bokfweb login gate); per-user login limit 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 --- compose.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'compose.yaml') diff --git a/compose.yaml b/compose.yaml index 25cb1eb..01825e4 100644 --- a/compose.yaml +++ b/compose.yaml @@ -22,6 +22,31 @@ services: BOKFD_TLS_CERT: /var/lib/bokfd/certs/certificates/${LEGO_DOMAIN:-bokf.makandra.eu}.crt BOKFD_TLS_KEY: /var/lib/bokfd/certs/certificates/${LEGO_DOMAIN:-bokf.makandra.eu}.key + # Web frontend: login gate + browser terminal on http://127.0.0.1:8790. + # The host's TLS proxy serves it as https://bokf.makandra.eu/web (see + # deploy/Caddyfile and docs/DEPLOY.md). Talks to bokfd over the socket + # only; read-only, no capabilities. + web: + image: ${BOKF_WEB_IMAGE:-bokf-web}:${BOKF_TAG:-latest} + restart: unless-stopped + depends_on: + - bokfd + ports: + - "127.0.0.1:8790:8790" + volumes: + - ./var/run:/run/bokfd + environment: + BOKF_WEB_MAX_SESSIONS: ${BOKF_WEB_MAX_SESSIONS:-20} + read_only: true + tmpfs: + - /tmp:size=256m,mode=1777 + cap_drop: + - ALL + security_opt: + - no-new-privileges:true + pids_limit: 512 + mem_limit: 2g + certs: image: goacme/lego:latest restart: unless-stopped -- cgit v1.3