From 5c5b11722d4c0e912a6698c1aa61997fdbfe5708 Mon Sep 17 00:00:00 2001 From: Brad Anderson Date: Sun, 11 Oct 2026 00:50:12 -0700 Subject: [PATCH] docs(streaming): document the session manager settings --- .env.example | 4 ++++ docker-compose.dev.yml | 3 +++ docker-compose.yml | 3 +++ docs/09-deployment/environment-variables.md | 15 +++++++++++++++ 4 files changed, 25 insertions(+) diff --git a/.env.example b/.env.example index b87ce14..43d993d 100644 --- a/.env.example +++ b/.env.example @@ -105,6 +105,10 @@ ENABLE_CACHE_PREWARM=true # --------------------------------------------------------------------------- # HOME_RECENT_HOURS=24 # ENABLE_CGI=false +# Streamed play for games that can't run in a browser, such as Java applets. +# Off unless both are set. See docs/09-deployment/environment-variables.md. +# STREAMING_API_URL=http://flashpoint-session-manager:8080 +# STREAMING_API_TOKEN= # Serve the built frontend from the backend (on by default in production) # SERVE_FRONTEND=true diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 614be78..b6b6f3f 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -64,6 +64,9 @@ services: # Application - HOME_RECENT_HOURS=${HOME_RECENT_HOURS:-24} - ENABLE_CGI=${ENABLE_CGI:-false} + # Streamed play for games that can't run in a browser (off unless both are set) + - STREAMING_API_URL=${STREAMING_API_URL:-} + - STREAMING_API_TOKEN=${STREAMING_API_TOKEN:-} # OpenTelemetry - OTEL_ENABLED=${OTEL_ENABLED:-false} - OTEL_EXPORTER_OTLP_ENDPOINT=${OTEL_EXPORTER_OTLP_ENDPOINT:-} diff --git a/docker-compose.yml b/docker-compose.yml index c867324..3b91070 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -56,6 +56,9 @@ services: # Application - HOME_RECENT_HOURS=${HOME_RECENT_HOURS:-24} - ENABLE_CGI=${ENABLE_CGI:-false} + # Streamed play for games that can't run in a browser (off unless both are set) + - STREAMING_API_URL=${STREAMING_API_URL:-} + - STREAMING_API_TOKEN=${STREAMING_API_TOKEN:-} # OpenTelemetry - OTEL_ENABLED=${OTEL_ENABLED:-false} - OTEL_EXPORTER_OTLP_ENDPOINT=${OTEL_EXPORTER_OTLP_ENDPOINT:-} diff --git a/docs/09-deployment/environment-variables.md b/docs/09-deployment/environment-variables.md index 63cbd9f..e49d654 100644 --- a/docs/09-deployment/environment-variables.md +++ b/docs/09-deployment/environment-variables.md @@ -116,6 +116,21 @@ and API share one origin. | `FRONTEND_DIST_PATH` | `/../frontend/dist` | Location of the built frontend (rarely needed) | | `RUFFLE_DATA_PATH` | `/app/data/ruffle` in production | Where Ruffle is installed. Must sit on a mounted volume, or an in-app update is lost when the container is recreated | +**Streaming:** + +Games that can't run in a browser, such as Java applets, can be streamed from a +server-side container by a separate session manager (flashpoint-ultimate-server). +The backend asks it which games are streamable and starts sessions for players. +Browsers reach each stream at `/stream//` on this site, so the reverse proxy +in front of flashpoint-web must route `/stream/` to the session manager, +including WebSocket upgrades. Saves for streamed games are kept in each +browser's IndexedDB. + +| Variable | Default | Description | +| --------------------- | ------- | ---------------------------------------------------------------------- | +| `STREAMING_API_URL` | - | Session manager's internal API, e.g. `http://flashpoint-session-manager:8080` | +| `STREAMING_API_TOKEN` | - | Token the session manager expects. Streaming is off unless both are set | + **OpenTelemetry:** | Variable | Default | Description |