Docker image with the web app and relay, for the home network #94

Merged
littlefox merged 1 commit from issue-93-docker-web into main 2026-10-18 09:32:11 +00:00
Owner

Closes #93

A Docker image that runs NeoKOM for the browser on the home network until there's a public server (#71, D-036).

  • Image forge.lysator.liu.se/littlefox/neokom-web (183 MB, published and pullable without login). Caddy serves the web build on 8080, kom-relay listens on 4895 (the port the app expects), and both run as a non-root user. If either process exits, the container stops and Docker restarts it.
  • Install (docs/DOCKER.md): download compose.yaml and run docker compose up -d. Settings go in .env: server, web port, version, allowed origins. The guide also covers updating (including a nightly cron line), logs, phones (with a Chrome flag to try installing over http), LAN security, troubleshooting and removal.
  • Publishing: tools/web-image.sh builds and pushes latest, git-<sha>, and X.Y.Z on a release tag; tools/release.sh --tag now runs it. It builds with the classic Docker builder too.
  • Testing: tools/web-image-smoke.sh checks an image against the devserver: health, page, .wasm MIME type, a Protocol A round trip through the relay, and a browser login.
  • Relay fix: an empty NEOKOM_RELAY_ORIGINS (which compose produces for an unset variable) used to refuse every page. It now means "unset".

Verified:

  • The smoke test passes. Logged in as Test Testsson with the badge "TLS från reläet" (screenshot checked).
  • The compose file runs with its defaults. One logged-out version probe to kom.lysator.liu.se went through the relay.
  • Health becomes healthy, and down takes 2 s.
  • Killing the relay inside the container made Docker restart it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8

Closes #93 A Docker image that runs NeoKOM for the browser on the home network until there's a public server (#71, D-036). - **Image** `forge.lysator.liu.se/littlefox/neokom-web` (183 MB, published and pullable without login). Caddy serves the web build on 8080, kom-relay listens on 4895 (the port the app expects), and both run as a non-root user. If either process exits, the container stops and Docker restarts it. - **Install** ([docs/DOCKER.md](docs/DOCKER.md)): download `compose.yaml` and run `docker compose up -d`. Settings go in `.env`: server, web port, version, allowed origins. The guide also covers updating (including a nightly cron line), logs, phones (with a Chrome flag to try installing over http), LAN security, troubleshooting and removal. - **Publishing**: `tools/web-image.sh` builds and pushes `latest`, `git-<sha>`, and `X.Y.Z` on a release tag; `tools/release.sh --tag` now runs it. It builds with the classic Docker builder too. - **Testing**: `tools/web-image-smoke.sh` checks an image against the devserver: health, page, `.wasm` MIME type, a Protocol A round trip through the relay, and a browser login. - **Relay fix**: an empty `NEOKOM_RELAY_ORIGINS` (which compose produces for an unset variable) used to refuse every page. It now means "unset". Verified: - The smoke test passes. Logged in as Test Testsson with the badge "TLS från reläet" (screenshot checked). - The compose file runs with its defaults. One logged-out version probe to kom.lysator.liu.se went through the relay. - Health becomes `healthy`, and `down` takes 2 s. - Killing the relay inside the container made Docker restart it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8
Docker image with the web app and relay, for the home network
All checks were successful
ci / check (push) Successful in 8m24s
packaging / arch (pull_request) Successful in 11m21s
ci / desktop (push) Successful in 13m5s
packaging / debian (pull_request) Successful in 15m35s
ci / e2e (push) Successful in 19m4s
packaging / nix (pull_request) Successful in 19m15s
packaging / fedora (pull_request) Successful in 24m14s
packaging / release (pull_request) Has been skipped
814214af80
The public server (#71) will take time; until then the web app runs
from one container on the user's network (D-036). Caddy serves the web
build on 8080 and kom-relay listens on 4895, the port the app expects.
A bash entrypoint supervises both, so if either exits Docker restarts
the container.

Installing means one compose file and `docker compose up -d`, with
settings in `.env` (docs/DOCKER.md). Nothing is compiled on the user's
machine: tools/web-image.sh pushes the image to forge's registry, and
release.sh --tag now runs it. tools/web-image-smoke.sh checks an image
against the devserver: health, page, wasm MIME type, a relay round
trip and a browser login.

The relay now treats an empty NEOKOM_RELAY_ORIGINS as unset. Compose
passes unset variables as "", and that used to refuse every page.

Refs #93

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8
littlefox referenced this pull request from a commit 2026-10-18 14:33:49 +00:00
Sign in to join this conversation.
No description provided.