Repository navigation
README hero, demo screenshots, and Docker self-hosting - #1
Conversation
The self-host server learns LOCAL_ANY_PEER: in Docker a published port arrives from the bridge, never loopback, so DEV_AUTH could not sign anyone in. Compose sets it and publishes the port on 127.0.0.1 only.
|
CI: Security note on |


Summary
docs/hero.svg, rendered todocs/hero.png(2000×1000, 270 KB).bun run demodata only), in a "What it looks like" section:docs/screenshot-board.png,docs/screenshot-issue.png,docs/screenshot-decision.png. The decision in the third one was asked for real over MCP (tools/call ask_decisionwith an agent token against the running demo). The demo GIF stays, just below them.Dockerfile(oven/bun:1,bun install --frozen-lockfile, UI built in a build stage, production deps only in the final image),docker-compose.yml(onelogbookservice, port published on127.0.0.1:${LOGBOOK_PORT:-8796}, named volumelogbook-data:/data,restart: unless-stopped,DEV_AUTH=${LOGBOOK_DEV_AUTH:-1}),.dockerignore, and a "Run it with Docker" quickstart in the README.App code change
entry/server.tsalready readsHOST/PORT(the Dockerfile setsHOST=0.0.0.0), butDEV_AUTHonly trusts loopback peers, and inside a container a published port always arrives from the Docker bridge. Without a change nobody could sign in to the Docker instance. The smallest fix is a new env var,LOCAL_ANY_PEER=1, which treats every TCP peer as this machine. Onlydocker-compose.ymlsets it, and it publishes the port on 127.0.0.1 only.DEV_AUTHstill requires alocalhost/127.0.0.1Host header, andLOGBOOK_DEV_AUTH=0turns it off for anything exposed (the README points to Tunnel + Access for that).Docker test (real run,
docker composewith a project name so it didn't clash with other stacks)Result: pass. The image is 351 MB.
bun run checkis clean andbun testpasses 40/40.Origin sync
Both commits cherry-picked cleanly onto
cursor/main(c192e78), andbun testpasses 48/48 there. Pushed asfm/logbook-hero-dockerat9007f4b93e2c2ad0d229c27ac4a51adbe6c3de73. No PR was opened on Origin.Note
Medium Risk
LOCAL_ANY_PEERwidens which TCP peers satisfy dev auto-login when enabled; mitigated by compose binding to 127.0.0.1 and unchanged localhost Host requirement forDEV_AUTH.Overview
Adds Docker-based self-hosting with a multi-stage
Dockerfile(Bun build + production image on port 8796, data in/data),docker-compose.yml(127.0.0.1-only port bind, named volume, defaultDEV_AUTH), and.dockerignore. The README gains a hero image, a What it looks like screenshot table, and a Run it with Docker quickstart (docs/hero.svgis the new diagram source).entry/server.tsintroducesLOCAL_ANY_PEER=1so requests through the Docker bridge count as local forDEV_AUTH(compose sets this while still publishing only on loopback); non-localhostHostheaders remain rejected per existing auth rules.Reviewed by Cursor Bugbot for commit a554675. Bugbot is set up for automated code reviews on this repo. Configure here.