M9: document combined browser and collaboration hosting

This commit is contained in:
michaelgiraldo
2026-11-01 11:23:39 -08:00
parent 5fc2840d90
commit 6f7814c9d3
2 changed files with 44 additions and 0 deletions
+12
View File
@@ -753,6 +753,18 @@ sudo -u figcraft figcraft-server --config /etc/figcraft-server/server.toml key
The other commands ([Managing files and links](#managing-files-and-links)) run the same way, as
the `figcraft` user with `--config /etc/figcraft-server/server.toml`.
**Browser editor on the same hostname (optional).** The steps above install the collaboration
server. To also serve the editor, copy the complete contents of the matching
`figcraft-web-<version>/` release directory into `/srv/figcraft-web`, with `index.html` directly
inside it; keep subdirectories such as `snippets/`. Use the commented browser-and-server block
in [`packaging/server/Caddyfile`](../packaging/server/Caddyfile) in place of its active server-only
block. Keep the loopback `listen`, `public_url` and `trusted_proxy` settings from steps 2 and 4.
The editor opens at `https://figcraft.example.com/app/`; the hostname root remains the
`wss://figcraft.example.com/` collaboration endpoint, not an editor homepage. Configure the
browser's `figcraft-server` meta tag as described in the
[web-hosting guide](../packaging/web/README.md#live-sessions), using the server address without a
publishing key. That guide also covers browser requirements, fonts and static-file delivery.
**In Docker instead of systemd.** [`packaging/server/Dockerfile`](../packaging/server/Dockerfile)
builds a small image (the binary on a distroless base, no shell) that runs as an unprivileged
user, keeps its files in the `/data` volume and stops gracefully on `docker stop`. Build it from
+32
View File
@@ -16,3 +16,35 @@ figcraft.example.com {
# reverse_proxy 127.0.0.1:47900
# }
# }
# Browser editor and server on the same hostname instead. Use this block IN PLACE OF the
# active block above. Copy the complete browser release into /srv/figcraft-web, with index.html
# directly inside it and subdirectories such as snippets/ kept. See packaging/web/README.md for
# the browser's figcraft-server meta tag; never put a publishing key in public HTML.
# Open the editor at /app/. The hostname root remains the WSS endpoint, not an editor homepage.
#
# figcraft.example.com {
# encode gzip
#
# redir /app /app/?{query} 308
#
# @entry path /app/ /app/index.html
# header @entry Cache-Control "no-cache"
#
# @release_assets path /app/figcraft-web-*.js /app/figcraft-web-*_bg.wasm
# header @release_assets Cache-Control "public, max-age=31536000, immutable"
#
# # No root favicon is configured: do not forward its implicit request to the WS server.
# handle /favicon.ico {
# respond 204
# }
#
# handle_path /app/* {
# root * /srv/figcraft-web
# file_server
# }
#
# handle {
# reverse_proxy 127.0.0.1:47900
# }
# }