Document and wire up STORE_URL for self-hosters

The Design Store defaults to the maintainer's shared catalog for
every build, but a self-hoster running their own gateway store
(STORE_ENABLED=1) had no way to actually point their Docker build at
it - VITE_STORE_URL existed in App.tsx but wasn't wired as a build
arg, and neither it nor the gateway-side STORE_* vars were documented
anywhere. Add the --build-arg STORE_URL passthrough (same unset-means-
no-override convention as DEFAULT_SERVER) and document both it and
the STORE_ENABLED/STORE_DATA_FILE/STORE_ALLOWED_ORIGIN/STORE_ADMIN_TOKEN
gateway env vars in the README.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
This commit is contained in:
MoepchiandClaude Sonnet 5 committed 2026-09-18 11:30:02 +00:00
1 parent 395aa3e6b6
commit 3c58650c1c
2 files changed
+11 -1

No files matched your search

+5 -1
View File
@@ -35,10 +35,14 @@ ARG DONATE_URL=keep
# sentinel needed.
ARG DEFAULT_SERVER=
ARG DEFAULT_CHANNEL=
# Design Store catalog to use - unset means "use the maintainer's shared
# one" (App.tsx's own default), same unset-means-no-override convention as
# DEFAULT_SERVER above.
ARG STORE_URL=
# tsc -b currently fails on pre-existing type errors unrelated to this build;
# vite build alone is enough to produce the production bundle.
RUN if [ "$DONATE_URL" = "keep" ]; then DONATE_URL_ENV=; else DONATE_URL_ENV="VITE_DONATE_URL=$DONATE_URL"; fi; \
env $DONATE_URL_ENV VITE_DEFAULT_SERVER="$DEFAULT_SERVER" VITE_DEFAULT_CHANNEL="$DEFAULT_CHANNEL" npx vite build
env $DONATE_URL_ENV VITE_DEFAULT_SERVER="$DEFAULT_SERVER" VITE_DEFAULT_CHANNEL="$DEFAULT_CHANNEL" VITE_STORE_URL="$STORE_URL" npx vite build
# --- Gateway ----------------------------------------------------------------
FROM node:22-bookworm-slim AS gateway-builder
+6
View File
@@ -180,6 +180,8 @@ docker run -d -p 8080:8080 --name webspeak3 moepchi/webspeak3:latest
The UI shows a small **Ko-fi donation button** in the bottom right corner. Building it yourself and would rather not carry someone else's donation link? `docker compose build --build-arg DONATE_URL=` removes it (any other value points it somewhere else). Outside Docker the same thing is a build-time variable: `VITE_DONATE_URL= npm run build` in `web/`.
The **Design Store** (browse/upload community themes) points at the maintainer's shared catalog by default, same as the official client — no setup needed. Want to run your own store instead, backed by your own gateway (`STORE_ENABLED=1`, see below)? `docker compose build --build-arg STORE_URL=https://your-gateway.example.com/api/store/themes`. Outside Docker: `VITE_STORE_URL=https://your-gateway.example.com/api/store/themes npm run build` in `web/`.
#### Environment variables
All optional; add them under `environment:` in your compose override next to `PORT`.
@@ -191,6 +193,10 @@ All optional; add them under `environment:` in your compose override next to `PO
| `WEB_DIST` | `web/dist` next to the gateway | Overrides the directory served when `WEB_STATIC` is on. Only needed for non-standard layouts. |
| `BROADCAST_TOKEN` | unset | Bearer token required to call `/api/broadcast` (send an in-app notice to all connected clients before a maintenance restart). Endpoint 404s while unset. |
| `TLS_CERT` / `TLS_KEY` | unset | Paths to serve the gateway over HTTPS/WSS directly instead of behind a reverse proxy/tunnel. Both must be set together. |
| `STORE_ENABLED` | off | Set to `1` to turn this gateway's own `/api/store/themes` endpoint on. Only needed if you want to run your own Design Store instead of using the maintainer's shared one (see `STORE_URL` build arg above) — the endpoint 404s while unset. |
| `STORE_DATA_FILE` | `store-themes.json` in the container's working dir | Where submitted themes (including screenshots) are stored. Mount a volume over this path if they should survive a container recreate. |
| `STORE_ALLOWED_ORIGIN` | `*` | CORS origin allowed to call the store endpoint, if you want to restrict it to your own frontend's origin. |
| `STORE_ADMIN_TOKEN` | unset | Bearer token that lets its holder publish under the reserved author name(s) and moderate (delete) any theme. Without it, nobody can. |
<details>
<summary><b>🛠️ Manual installation (without Docker)</b></summary>