UI library licence: production release runbook
For the StockLive team running release.yml to staging and production. Written 2026-10-29 against RapidRailsUI 0.94.5, the version on main.
What changes on the next release
Production runs UI library 0.61.1 today. The next release from main moves it to 0.94.5. 0.94.5 checks its licence when the app boots in any environment that is not development or test, so testing, staging and production all check it. If the check fails, the app does not boot, and the deploy's health check fails.
The testing deploy of 0.94.3 booted on 2026-10-27. That proves testing's licence settings only if RAPID_RAILS_UI_SKIP_LICENSE_VALIDATION is not set there (outside production that variable still skips the check). Staging and production have not been checked on this version.
What each environment needs
| Variable | Needed | Notes |
|---|---|---|
RAPID_RAILS_UI_LICENSE_KEY |
yes | the licence key |
RAPID_RAILS_UI_LICENSE_SECRET |
yes | the secret issued with the key; without it boot stops |
RAPID_RAILS_UI_SKIP_LICENSE_VALIDATION |
must NOT be set on a running app | in production it stops boot with "is no longer honoured"; Docker image builds don't need it (asset builds are exempt) |
The secret and key live wherever the other app secrets for that environment live (ECS task definition or secrets store). Never paste them in Slack, Jira or a PR.
At boot the app also calls the licence server once (https://rapidrails.cc, outbound HTTPS):
- server unreachable or slow: the app still boots and logs a warning;
- server says the key is invalid, revoked, expired, or over its domain limit: boot stops.
Before the release (5 minutes, no downtime)
- On a machine or pod with the new image (staging after a staging release, or any container built from
main), with that environment's variables loaded:
bin/rails rui:license:check
ONLINE=1 bin/rails rui:license:check
It prints whether the key and secret are set, the tier and expiry, and (with ONLINE=1) what the licence server says. It records nothing and never prints the key.
2. If it is not all green, stop and use the table below. Release production only after staging boots on the new version.
If a deploy fails: error to fix
The error text is in the container log at boot.
| Log heading | Cause | Fix |
|---|---|---|
RapidRailsUI License Required |
key variable missing | set RAPID_RAILS_UI_LICENSE_KEY, redeploy |
RapidRailsUI License Secret Required |
secret variable missing | set RAPID_RAILS_UI_LICENSE_SECRET, redeploy |
RAPID_RAILS_UI_SKIP_LICENSE_VALIDATION is no longer honoured |
old bypass variable still set | delete it from the running app's environment, redeploy |
Invalid RapidRailsUI License |
key mistyped, extra space, or key and secret don't belong together | re-copy both from the source; if still failing, ask Ahmed for a fresh pair |
RapidRailsUI License Expired |
key past its date | Ahmed issues a renewed key |
License has been revoked / not recognised by the activation server
|
server rejects the key | Ahmed checks the licence record and issues the right key |
Domain limit exceeded |
more hosts than the licence allows | Ahmed raises the limit |
License activation failed ... App will continue (warning only) |
server unreachable | nothing blocks; allow outbound HTTPS to rapidrails.cc so activation is recorded |
Rollback
Redeploy the previous production image (the last successful release.yml run). That brings back 0.61.1 and its old check. Fix the variables, then release again.
Contacts
- For any matters about licence keys, secrets, limits: hit me at [email protected]. Send the log heading and environment name, never the key :)
- Deploys: whoever runs
release.yml.
Later: version 0.95 and up
StockLive stays on the 0.94 line until production has booted on 0.94.5 with a clean ONLINE=1 check. The later versions check the licence more strictly, so production must be clean first.