diff --git a/Dockerfile b/Dockerfile index a94f4c4..47f19dc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/README.md b/README.md index 6f19af0..408029e 100644 --- a/README.md +++ b/README.md @@ -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. |
🛠️ Manual installation (without Docker)