feat(docker): serve the WebGL browser client from the dedicated-server image#123
Merged
Conversation
…r image Adds in-browser play to the optional Docker server (issue #121): - Api: serve a Unity WebGL build at /play (same-origin static mount with Content-Encoding for Brotli files, immutable caching, and a friendly "not installed yet" page). Honor X-Forwarded-* so it works behind a proxy. - Portal: a "Play in the browser" deep-link (server_host/port pre-filled). - Dockerfile/compose: /app/webgl volume + unzip; WS + LAN notes. The build is injected out-of-band (bind-mount, or BBS_FETCH_WEBGL=1 pulls a release webgl*.zip via the entrypoint) since Unity can't build in the image. - Public https/wss: new Caddy TLS profile (docker-compose.tls.yml + docker/Caddyfile). localhost/LAN need no TLS. - Optional PostgreSQL overlay (docker-compose.postgres.yml); SQLite default. - release.yml: build-player-webgl + package-webgl jobs ship the webgl*.zip. - Docs: SELF_HOSTING "Play in the browser" + TLS matrix + hosting/cost options + Postgres; README mentions browser play. The GameCI WebGL build job is untested and may need iteration on the first tagged release; a failure there does not block the other release assets. Closes #121 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements #121 — play Blocks Beyond the Stars in a browser, served from the optional Docker server.
/play: same-origin static mount of a Unity WebGL build, withContent-Encoding: brfor Unity Brotli files, immutable caching (no-cacheforindex.html), and a friendly "not installed yet" page. AddedForwardedHeadersso the portal link +wssscheme are correct behind a reverse proxy./play?server_host=…&server_port=31415&bbs_auto_join=0).client/Build/WebGLat/app/webgl, orBBS_FETCH_WEBGL=1pulls a releasewebgl*.zipvia the entrypoint.wss://: new Caddy TLS profile (docker-compose.tls.yml+docker/Caddyfile) — auto Let'''s Encrypt. localhost/LAN-http need none.docker-compose.postgres.yml); SQLite stays the default.build-player-webgl+package-webgljobs ship thewebgl*.zipasset.Verification
dotnet build BlocksBeyondTheStars.CI.slnf -warnaserror→ 0 warnings.dotnet format --verify-no-changes→ clean.PortalPageTests→ 5/5 pass (incl. the new deep-link assertion).bash -n docker/entrypoint.shOK;docker compose configOK for the base, TLS and Postgres overlays.Caveats
Closes #121
🤖 Generated with Claude Code