starfleet-ui
Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.
Dernier runRéussi#6 · main · 2 min 01 s
0Étoiles
0Forks
0Issues
Deployment
The site runs on Render as a container image. Every push to main that changes
more than documentation runs .toboggan/workflows/deploy.yml:
check ── image ── deploy
- check (instance runner):
bun run check,bun run test,bun run build. - image (
starfleet-podmanrunner):scripts/publish-image.sh <short commit> --pushbuildsdeploy/Containerfileand smoke-tests the image. The test checks that it boots, that/healthzanswers with its version, and that/loginrenders. It then pushestoboggan.cloud/starfleet/starfleet-ui:<commit>and:latestwith the job's own token. - deploy (instance runner,
productionenvironment): points the Render service's configured image at that exact tag and deploys it through Render's API. Without an API key it falls back to the deploy hook (imgURL=), with a warning. It then polls$RENDER_URL/healthzuntil the site reports the commit (15 minutes at most).
A manual run on main (tob workflow run deploy.yml) redeploys.
Why it works this way
- Render pulls a public image. Render's registry credentials cover GitHub, GitLab, Docker Hub, Google Artifact Registry and AWS ECR, not toboggan. So the repository is public, and the package a workflow pushes inherits that. The image holds no secrets: each player's API key lives in their own cookie.
- A podman runner of our own. toboggan.cloud's podman runner serves the toboggan repository only,
and
corellia-starfleet-podmanis scoped to starfleet-api. - The service's configured image must be the deployed one. Render starts every new instance
from the service's configured image: a free instance waking from sleep, a restart. A deploy hook's
imgURLdeploys an image once but leaves that setting alone. On 2026-11-07 the setting was still:latest, and instances started after the deploy served the old image while the dashboard showed the new one live. So the job sets the image (PATCH /v1/services/{id}) before deploying it. - The deploy hook is a secret. Its URL carries a key. It lives in the
productionenvironment, which only runs on the default branch can read. It never appears on a command line or in the log.
One-time setup
- A runner for this repository. Run
tob runner token -R starfleet/starfleet-uito get a registration token. On the CI host, register it with the labelstarfleet-podman, the same way starfleet-api's runner is set up (toboggandocs/registry.md, "Building in CI"). Alternatively, register one runner for the wholestarfleetigloo on/runnersso both repositories share it. - The first image. Push
main. With noRENDER_URLset yet, the run publishes the image and skips the deploy job. - The Render service. Create a Web Service from the existing image
toboggan.cloud/starfleet/starfleet-ui:latestwith no credential, and set its health check path to/healthz. No environment variables are needed, because Render setsPORT. Optionally setSTARFLEET_API_URLto point at another game server. - The hook and the address. Copy the service's deploy hook (Settings → Deploy Hook), then:
tob secret set RENDER_DEPLOY_HOOK --env production --body-file -and paste the hook, then Ctrl-D. Reading it from stdin keeps it out of your shell history.tob variable set RENDER_URL --body https://<service>.onrender.com.
- The API key and the service id, so a deploy also pins the service's image (see "Why it works
this way"). Create an API key in Render (Account settings → API Keys), then:
tob secret set RENDER_API_KEY --env production --body-file -, paste the key, then Ctrl-D.tob variable set RENDER_SERVICE_ID --body srv-…(the dashboard shows the service ID).
- Deploy. Run
tob workflow run deploy.yml, or push.
Running the image locally
scripts/publish-image.sh local # build + smoke test, no push
podman run --rm -p 3000:3000 toboggan.cloud/starfleet/starfleet-ui:local
Configuration
| Variable | Default | |
|---|---|---|
STARFLEET_API_URL | https://starfleet.glo.quebec | game API the server proxies to |
PORT / HOST | 3000 / 0.0.0.0 (image) | Render sets PORT |
STARFLEET_UI_VERSION | dev | stamped by publish-image.sh; /healthz answers it |
CONNECTION_IDLE_TIMEOUT | 60 | seconds; must exceed the API's 15 s SSE keepalive |
Variables are declared in src/env.ts. SvelteKit 3 inlines any variable that isn't declared there
at build time.