2.8 KiB
OpenRCT2 browser deployment
This deployment serves the locally built browser files from the homelab Ceph object gateway. Traefik supplies HTTPS and the response headers needed by the WebAssembly thread build. There is no game container or CI pipeline.
Rebuild on the laptop
The Emscripten build uses the fork's pinned build container and the browser
page in rosebud/static:
./rosebud/docker/clone-deps.sh
podman build -t openrct2-emscripten-local -f rosebud/docker/Dockerfile rosebud/docker
podman run --rm -v "$PWD:/src" -w /src localhost/openrct2-emscripten-local:latest bash ./scripts/build-emscripten
Bundle the matching installed OpenRCT2 assets and your Steam RCT2 files. Run these commands from the repository root:
repo_root="$PWD"
steam_rct2="$HOME/.steam/steam/steamapps/common/Rollercoaster Tycoon 2"
rm -f build/www/assets.zip build/www/rct2-content.zip
(cd /usr/share/openrct2 && zip -qr "$repo_root/build/www/assets.zip" assetpack fonts.dat g2.dat language object palettes.dat scenario_patches sequence shaders tracks.dat)
python3 scripts/patch-browser-title-sequence.py
(cd "$steam_rct2" && zip -qr "$repo_root/build/www/rct2-content.zip" Data ObjData Scenarios Tracks 'Saved Games')
The title sequence patch keeps the title park from cycling into a blocking
park load in this browser build. The build/www directory is the upload source.
Deploy
- Build the browser game locally. Put the purchased RCT2 game resources in
build/www/rct2-content.zip;assets.zipand the engine files must also be present inbuild/www/. - With the homelab Kubernetes context selected, create the dedicated S3 user:
kubectl apply -f deploy/s3-user.yaml. Wait for it to be ready and forrook-ceph-object-user-my-store-openrct2-publisherto appear inrook-ceph. - Run
./deploy/publish.shfrom the repository. It reads the Rook-generated credentials into environment variables forrclone, creates theopenrct2-webbucket, dry-runs and performsrclone sync, and applies a public-read policy. It does not write credentials into the repository or rclone configuration. - Apply the route with
kubectl apply -f deploy/route.yaml. ExternalDNS creates therct.brunner.ninjaDNS record. Openhttps://rct.brunner.ninja/in Brave.
The public-read policy grants only object reads, so a browser can download the
game files but cannot list or change the bucket. rct2-content.zip includes
assets from the purchased game and is publicly downloadable at this address.
Do not commit it, assets.zip, or generated build/ and dist/ folders.
For a later update, rebuild locally and rerun deploy/publish.sh before
reapplying the route only if its configuration changed. rclone sync deletes
objects that no longer appear in build/www/; review its dry run output.