3.2 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 0.5.7 assets and your Steam RCT1 and RCT2 files. Run these commands from the repository root:
repo_root="$PWD"
steam_rct2="$HOME/.steam/steam/steamapps/common/Rollercoaster Tycoon 2"
steam_rct1="$HOME/.steam/steam/steamapps/common/RollerCoaster Tycoon Deluxe"
rm -f build/www/assets.zip build/www/rct1-content.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)
(cd "$steam_rct1" && zip -qr "$repo_root/build/www/rct1-content.zip" Data Scenarios Tracks)
(cd "$steam_rct2" && zip -qr "$repo_root/build/www/rct2-content.zip" Data ObjData Scenarios Tracks 'Saved Games')
The original RCT1 and OpenRCT2 title sequences are left intact. The browser
selects the RCT1 title sequence, which starts at Diamond Heights and then
cycles through the original RCT1 parks.
The browser sets the RCT1 paths, German, Euro, RCT1 title music, and the RCT1
UI theme once per browser profile, preserving later changes made in game.
The build/www directory is the upload source.
Deploy
- Build the browser game locally. Put the purchased game resources in
build/www/rct1-content.zipandbuild/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. rct1-content.zip and
rct2-content.zip include assets from the purchased games and are 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.