OVH deployment¶
Private greeting file¶
The greeting-enabled API image mounts the host directory
/opt/motoxdashboard/shared/greetings read-only at
/run/motoxdashboard/greetings. Set MOTO_GREETING_DIRECTORY in the private
Compose environment if the host directory must live elsewhere. Create the
directory before activation and grant the non-root container user read and
traverse access (for example, use its group on a setgid directory with mode
2750 and files with mode 0640). Check the runtime identity on the intended
image; keep the files out of Git, published docs, and release archives.
Save a UTF-8 greetings.json without a BOM in that directory. This example uses placeholder
text; the actual messages belong only in the private file:
{
"phrases": ["Buenos días", "Un abrazo"],
"nicknames": ["Estrella"],
"hearts": ["❤️", "💕"],
"overrides": {
"2026-12-25": { "message": "Feliz Navidad, Estrella!", "heart": "❤️" }
}
}
The override is the whole message before the heart and applies on its Bogotá calendar date. With no override, the configured lists produce a stable daily choice as long as the lists are unchanged. The file is capped at 16 KiB; the loader accepts up to 32 phrases, nicknames, and dated overrides, and one or two supported hearts.
For later edits, upload into the mounted directory under a temporary filename,
set the same readable permissions, then rename it over greetings.json on
the same filesystem. Do not swap the directory itself or mount the file
directly: the directory mount lets the running process see the new file after
an atomic rename. No restart, image rebuild, or APK update is required for
file edits. The API rereads the file on the greeting source's 15-minute refresh
cycle, not in phone requests. The next greeting still plays at the scheduled
09:00 slot; an afternoon edit does not create an extra Bulletin.
A missing or invalid file retains the last valid choices in memory and
logs a warning without logging the contents. With no valid file since process
start, no greeting is published. Identical selected message and heart reuse a
bounded in-memory PNG cache; changed content publishes a new image hash. For
local development, set DailyGreeting__Directory to an absolute private path.
The file loader and mount require a one-time backend release; this section is
not a deployment receipt.
Current release: Andrea profile and private greetings¶
On 9 November 2026, OVH activated the saved API image from
5b4a519502a3336a7bef67d9a76d6f4a0a9f3711 with image configuration ID
sha256:29de1e8e3d198b79cb45891fa8599164c2e8a257c24a02de61bc2b2bc1b8c1eb.
The checked archives are under artifacts/5b4a519502a3, and current points
to releases/5b4a519502a3 under /opt/motoxdashboard. The private greeting
directory is mounted read-only. Both existing device credentials still map to
bedroom. Activating Andrea's lineup on the Play requires a separate
credential mapping change and an APK that supports scheduled lineups.
The saved image passed the local Andrea rehearsal, including real launch and briefing feeds, both morning reservations, the greeting reservation, and PNG hash checks. Its peak cgroup memory in that rehearsal was 91,992,064 bytes. The college rehearsal timed out waiting for a basketball card because the sports providers returned valid empty slates. Over production HTTPS, both existing credentials received three weather and news cards, and the manifest and assets passed conditional 304 and asset hash checks. Anonymous manifest access returned 401. AndreaWeb HTTPS and the Nginx configuration checksums also passed.
For rollback, reinstall the retained 2a3065d113b5 image and source with the
existing private environment, verify public HTTPS, and repoint current to
that release. Keep the shared greeting directory and persistent caches.
Previous release: Iowa State basketball and seasonal MLB pause¶
On 7 November 2026, OVH switched to
2a3065d113b5cfdcbcee84655c7ea1e0d2c7c059 with image configuration ID
sha256:6cae28e5a4dec461dc4146eaec4d60e23da5b521cc33e185a87fa75c4f8dc511.
The saved archives are under artifacts/2a3065d113b5, and current points to
releases/2a3065d113b5 under /opt/motoxdashboard. Both MLB adapters remain
in the code but are disabled and unassigned. Iowa State men's basketball is
enabled; Iowa State football and international men's fútbol remain enabled.
The exact saved image passed the college rehearsal
(MOTO_REHEARSAL_LINEUP=college), including real basketball and football
cards, repeated publication, and weather/news outage and recovery. Peak
cgroup memory was 109,064,192 bytes under the 256 MiB limit, with no swap at
recovery. Production HTTPS verified anonymous 401, authenticated 200 and
conditional 304 for the manifest and all five PNGs, plus matching asset
hashes. The cards included Baylor–Iowa State and the Southern Miss basketball
final; fútbol returned a valid empty slate. No APK, production environment
or Nginx changes were made, and AndreaWeb HTTPS remained healthy.
To roll back, reinstall the retained d8bacce9828f release below with the
current private environment, verify HTTPS, then repoint current. This
restores the MLB feeds and disables the basketball feed. Preserve both
persistent cache volumes.
Previous release: shared sports and Bulletin cadence¶
The previous API release is d8bacce9828f25041d53fcdefce0e5bf2d03339c,
deployed on 11 October 2026 as motoxdashboard-api:d8bacce9828f. Its saved and
loaded image configuration ID is
sha256:3feb797e215a9b8b063a78173e9d56122cd06d4dae04075c7f3cffb414375816.
current pointed to /opt/motoxdashboard/releases/d8bacce9828f; checked archives
remain in /opt/motoxdashboard/artifacts/d8bacce9828f.
This server-only update keeps yesterday's MLB finals alongside today/tomorrow games. Both providers published the White Sox 0–Guardians 2 final and upcoming games over production HTTPS. Initial acceptance returned eight 15-second cards and an automatically calculated 120-second bulletin budget. Counts remain dynamic as sources, eligibility and expiry change; eight cards are a cap, not a required feed size. No APK or device contract changed.
Fresh backend gates passed 1,037 tests, build/analyzers and format verification; script regressions, ShellCheck/shfmt, Compose validation and strict MkDocs also passed. The exact saved image passed the real-provider repeated-publication, asset, outage and recovery rehearsal under 256 MiB/0.5 CPU/128 PID limits. Steady memory was 89,812,992 bytes and peak 93,335,552 bytes, with no OOM or swap. The separate eight-card fixture run using the image's original API assembly peaked at 41,840,640 bytes. These are bounded rehearsals, not a bedside soak.
Activation preserved the private environment, both credentials, persistent quota/logo volumes and every Nginx site checksum. AndreaWeb HTTPS and all containers remained healthy. Public readiness, anonymous manifest/asset 401, authenticated manifest/assets, PNG hashes and conditional 304 checks passed. The Play, with no ADB reverse mapping, subsequently displayed both final-result cards and upcoming cards during production Bulletins. Logs showed a prefetch at 08:59, presentation at 09:00 and seven 15-second cards through 09:01:30. No new Android test run or APK installation is claimed for this backend-only fix; the client acceptance baseline below remains applicable.
Roll back the MLB calendar update¶
The retained compatible release is ef98189cf2c1d01301c5c1ec8a20baa1300b1ffc;
its image configuration ID is
sha256:5a444372016e7eae626cf1e1791246a5bb3e17896d0823b82dbe76165fe5beab.
The private configuration and identity backup is
/opt/motoxdashboard/shared/backups/pre-mlb-calendar-d8bacce9828f.
This rollout did not change configuration. Compare the backed-up environment
with the current file before restoring it so later credential changes survive.
Verify the retained archive checksums and image identity, then install without
rebuilding:
cd /opt/motoxdashboard/releases/ef98189cf2c1
bash scripts/install-release.sh /opt/motoxdashboard/shared/production.env ef98189cf2c1d01301c5c1ec8a20baa1300b1ffc
After public health/authentication/assets/304 and AndreaWeb checks pass:
Preserve the quota and logo volumes; do not use down -v. This rollback restores
the older MLB selection priority, not the anonymous scaffold. No rollback was
performed.
Shared sports rollout baseline¶
On 11 October 2026 (America/Bogota), the exact locally prepared and rehearsed
release ef98189cf2c1d01301c5c1ec8a20baa1300b1ffc was deployed as
motoxdashboard-api:ef98189cf2c1. Its saved and loaded image configuration ID is
sha256:5a444372016e7eae626cf1e1791246a5bb3e17896d0823b82dbe76165fe5beab.
At that activation, current pointed to releases/ef98189cf2c1; the matching
archives remain under /opt/motoxdashboard/artifacts/ef98189cf2c1. The later
documentation-only receipt commit does not change this deployed identity.
The existing release installer activated the saved image on loopback 8088. No VPS build, bootstrap, DNS, certificate or Nginx change occurred. All Nginx site hashes and the private production environment remained unchanged; both device credential hashes were preserved. Preflight found 18 GB free disk, about 2.6 GiB available RAM, unused 1 GiB swap, and healthy AndreaWeb containers. AndreaWeb HTTPS returned 200 before and after activation.
The bedroom profile now enables international men's fútbol and ISU NCAA
football alongside weather, both postseason baseball providers, NYT and
Guardian. Fútbol and football returned legitimate empty results for the new
date window, not access failures. Five cards were published, with 15 seconds
per card and a 75-second bulletin budget. ISU basketball remains disabled
pending demonstrated current-season free access. Both persistent quota and
logo volumes were created with writable ownership for the non-root app user.
Public readiness, anonymous manifest/asset 401, authenticated manifest/assets, every PNG's SHA-256 and conditional manifest/asset 304 checks passed. The exact saved image also passed repeated real weather/news publication and provider network outage/recovery under the normal 256 MiB, 0.5 CPU and 128 PID limits. Its final steady sample was 89,587,712 bytes and peak 90,730,496 bytes, with zero swap and OOM events. The separate network-isolated fixture entrypoint used the image's original API assembly to verify eight cards, three revisions, retained assets, missing logos and provider failure/recovery; peak was 42,156,032 bytes. These bounded rehearsals do not establish multi-hour stability or repeated real sports updates at free-tier polling intervals.
The latest APK was installed on the Play without clearing its credential.
Its installed SHA-256 matches the local artifact:
5ad566748b4d319ae988b6b5740fd7c0b6b5c1a6e6627bb8399a4507d9ede3b4.
The operator restored production HTTPS and removed the development reverse
mapping. Device logs confirmed an activated production feed and rotation.
The next periodic Dashboard request occurred five minutes after the initial
refresh completed; it activated a fresh feed from the newly deployed server.
The quality receipt distinguishes
the 43 focused Play cases from outstanding original Moto X/API 22 cadence
acceptance, battery measurement and the multi-hour bedside soak.
Roll back the shared-sports baseline¶
The retained previous authenticated postseason release is
c8da2218d19a66e72bb057ba05ae8e5c48746dfa, image configuration ID
sha256:2e72eb8245b62c2af4c8e392287723d32a76533c4e7acaf5f69b11415c9c63a7.
Configuration and deployment records were saved at
/opt/motoxdashboard/shared/backups/pre-sports-cadence-ef98189cf2c1.
Before rollback, compare its private environment with the current file so
later credentials are not inadvertently removed. This rollout did not change
that file, but later administration may have done so.
Verify the retained archive checksums and load its saved image if necessary. Then run the retained installer, without rebuilding:
cd /opt/motoxdashboard/releases/c8da2218d19a
bash scripts/install-release.sh /opt/motoxdashboard/shared/production.env c8da2218d19a66e72bb057ba05ae8e5c48746dfa
Verify public readiness, anonymous 401, authenticated manifests/assets, 304,
both device credentials and AndreaWeb HTTPS before moving current back to
that release:
The installer switches the container and deployment records; this separate
link update follows acceptance. Restore a matching backed-up environment only
after reviewing later changes. Preserve motoxdashboard_api-sports-state and
motoxdashboard_team-logo-cache; an older image may leave them unused.
Never use down -v, delete quota state to regain credit, or roll back to the
anonymous scaffold merely because it is retained. The updated APK continues
to understand the older schema-1 server; a backend rollback does not undo the
phone's refresh cadence. No rollback was performed.
Observed environment¶
A read-only inspection on September 27, 2026 found the existing AndreaWeb
deployment under /opt/andreaweb, with system Nginx terminating public HTTP
and HTTPS. Its application containers bind loopback ports 3000, 3100, 3902, and
9000. Moto X Dashboard therefore defaults to unused loopback port 8088.
On September 30, 2026, DNS and a dedicated HTTPS site were configured for
retroapi.everybodypackit.com. Let's Encrypt issuance and simulated renewal
passed; AndreaWeb's configuration was unchanged and its HTTPS check passed.
The site initially returns a deliberate 503 placeholder. API deployment and
switching that placeholder to a proxy are separate operations; do not infer
deployment merely from successful certificate issuance.
Activation completed September 30, 2026 (America/Bogota): release
b2221b742993db040467c92064877e83bbd83450 is running as the healthy
motoxdashboard-api-1 container, with /opt/motoxdashboard/current pointing
to releases/b2221b742993. The dedicated HTTPS site now proxies to loopback
8088; public readiness and the schema-1 empty dashboard manifest passed.
AndreaWeb's configuration was unchanged, its HTTPS check passed, and all six
containers remained healthy. The previous site backup is
/var/backups/retroapi-deploy.JzKoAfOg. Provider integration and Android polling
were not deployed at that activation; the provider rollout below supersedes
that scaffold. Future releases use
the normal release workflow, not the one-time bootstrap.
A read-only check early on 1 October reconfirmed that current and
shared/deployments/api.commit still identify that scaffold. The locally frozen
candidate and its 256 MiB rehearsal results are recorded in the
PoC release receipt; it
had not been deployed at that point. The later authorized rollout follows.
Provider deployment: 1 October 2026¶
The exact saved candidate a47e94caab8c1a33c1db33df7e27de95f9888a1e is
running on OVH. No rebuild, bootstrap, DNS change, Nginx edit or reload occurred.
Transferred archives passed SHA-256 verification; the loaded Docker 24 image ID
matched sha256:927c0cb13965405529e33c3420b886b4f13eb7c3877576463ac861b2c4a13201.
current points to /opt/motoxdashboard/releases/a47e94caab8c; deployment
records identify the same commit/image. Saved artifacts remain in
/opt/motoxdashboard/artifacts/a47e94caab8c.
Fresh preflight found 24 GB free, about 2.6 GiB available RAM and 1 GiB swap
(about 7 MiB used). All six AndreaWeb containers were healthy, and its public
HTTPS response was 200 before and after deployment. All Nginx site file hashes
were unchanged. sudo -n nginx -t required interactive authentication and did
not run; no configuration was changed or reloaded.
Public HTTPS readiness, anonymous manifest 401, authenticated manifest 200/304, and every returned asset's anonymous 401, authenticated 200, SHA-256 and 304 checks passed. Weather, NYT and Guardian are live; Yankees is missing. MLB returns HTTP 406 from the edge reached by the API on OVH. Bounded diagnostic requests with the same URL/headers returned 200 through one Fastly edge and 406 through another, suggesting edge-dependent rejection rather than a proven query defect. No edge IP was pinned in production or provider implementation changed. Four-source production acceptance remains open; normal retries continue. A Docker sample showed about 47 MiB of 256 MiB; this is not a peak-memory measurement.
Device xt1058-bedroom maps to profile bedroom. The raw token stays in the
workstation's private
/home/justin/.local/state/motoxdashboard/production-20261001/device.token
and phone app-private storage. Only its hash was installed on the server.
Public probe evidence is alongside the local token under probes/; never
publish this private directory. The XT1058 activated/displayed real cards over
production HTTPS with no ADB reverse mapping. Physical Wi-Fi-off testing
confirmed no active network, failed refresh and continued cached cards;
restoring Wi-Fi and resuming produced a successful 304 refresh. Just Clock
survived force-stop/relaunch without polling during observation. Highlights
returned to Just Clock. Bulletins selection persisted across restart; no
scheduled wall-clock boundary was forced. The phone was left in Dashboard mode
with Wi-Fi restored.
Moto X Play enrollment: 2 October 2026¶
The Android 10 XT1563 was enrolled separately as xt1563-bedroom in the same
bedroom profile. Its raw token remains in the workstation's private
/home/justin/.local/state/motoxdashboard/play-xt1563-20261002/device.token
and in the Play's app-private storage. Only its SHA-256 was appended to
/opt/motoxdashboard/shared/production.env; the original environment was
saved at /opt/motoxdashboard/shared/backups/pre-play-20261002/production.env
before the change. The existing a47e94caab8c container was recreated with
that updated configuration. No image rebuild, release switch, Nginx or DNS
change occurred. Health and AndreaWeb HTTPS remained 200; all six AndreaWeb
containers stayed healthy.
The Play's old debug loopback override was removed. With no ADB reverse
mapping, the phone fetched and rotated real weather/NYT/Guardian cards from
the production HTTPS origin. Its token returned manifest 200, conditional
304, and an asset 200 whose bytes matched the manifest SHA-256. Just Clock and
Dashboard were selected on-device. During physical Wi-Fi loss, cached cards
remained visible despite UnknownHostException; after Wi-Fi returned, the
app received 304 and resumed rotation. It was left in Dashboard mode with
Wi-Fi on. Yankees remains absent due to the upstream MLB 406.
To revoke only the Play, remove its xt1563-bedroom:bedroom:<hash> entry from
the private credential list and recreate only the API container using the
current release's install-release.sh, then verify anonymous 401 and the Moto
X credential still returns 200. Restoring the entire saved environment is
appropriate only if no later credential changes need preservation. Never put
the raw token into the VPS environment or command arguments.
Configuration-aware recovery and rollback¶
Owner-only backup directory:
/opt/motoxdashboard/shared/backups/pre-provider-20261001. It contains the
old production.env, current.txt, deployment records and Nginx checksums.
provider-production.env separately preserves the new hash-bearing environment.
The installer updates deployment records before public acceptance, so those
records were backed up too.
To recover the exact authenticated image without rebuilding:
cp -p /opt/motoxdashboard/shared/backups/pre-provider-20261001/provider-production.env /opt/motoxdashboard/shared/production.env
cd /opt/motoxdashboard/artifacts/a47e94caab8c
sha256sum -c SHA256SUMS
docker load -i image.tar
test "$(docker image inspect --format '{{.Id}}' motoxdashboard-api:a47e94caab8c)" = "$(cat image.id)"
cd /opt/motoxdashboard/releases/a47e94caab8c
bash scripts/install-release.sh /opt/motoxdashboard/shared/production.env a47e94caab8c1a33c1db33df7e27de95f9888a1e
Repeat public auth/asset probes before accepting recovery and restore current
to that release after they pass. Restoring this environment would undo later
token rotations; review it before use.
To revert configuration to the old scaffold, first stop only this API:
docker stop motoxdashboard-api-1
cp -p /opt/motoxdashboard/shared/backups/pre-provider-20261001/production.env /opt/motoxdashboard/shared/production.env
cp -p /opt/motoxdashboard/shared/backups/pre-provider-20261001/deployments/api.commit /opt/motoxdashboard/shared/deployments/api.commit
cp -p /opt/motoxdashboard/shared/backups/pre-provider-20261001/deployments/api.image /opt/motoxdashboard/shared/deployments/api.image
ln -sfn /opt/motoxdashboard/releases/b2221b742993 /opt/motoxdashboard/current
This deliberately leaves public requests receiving 502: it restores old configuration/records, not a running old service. Never restart the scaffold while Nginx exposes port 8088. A separately reviewed privileged 503-placeholder change or equivalent isolation must precede any scaffold restart. No rollback was executed during this three-source rollout; MLB acceptance remains open.
A fresh pre-deployment inspection found 24 GB free on the 39 GB root disk, 2.6 GiB available memory, and an existing 1 GiB swap file. All six AndreaWeb containers were healthy. These are observations, not ongoing capacity guarantees.
Initial activation uses scripts/bootstrap-retroapi.sh, reviewed and uploaded
alongside the locally prepared artifacts. Load the image as the deployment
user, then run sudo bash /home/justin/bootstrap-retroapi.sh
/home/justin/retroapi-release-<short-commit> interactively. The script refuses
an existing /opt/motoxdashboard, validates the staged checksums/image ID,
checks port availability and AndreaWeb, and backs up the dedicated Nginx site.
It extracts/executes application release code as justin, not root. On failure
it restores the placeholder and stops only this API; retained files must be
inspected before retrying. Do not rerun the earlier HTTPS-placeholder setup
against the activated proxy site.
Intended topology¶
system Nginx :443
-> 127.0.0.1:8088 MotoXDashboard API
Docker Compose project: motoxdashboard
-> ASP.NET Core API container (volatile cards; optional durable quota state)
The public hostname is retroapi.everybodypackit.com. The implemented transport
uses a normally renewed public certificate plus app-scoped ISRG Root X1 and
ISRG Root YR anchors alongside Android's system roots. It excludes user-installed
CAs; installing a user CA is not needed for this app. Hostname and chain
validation remain mandatory; never pin the renewable leaf certificate or disable
verification. See
ADR 0002.
Port 8088 is only the collision-free host-side loopback mapping; the ASP.NET
container continues to listen on its normal internal port 8080. It is not a
public port or protocol requirement and may change if the VPS allocation changes.
Add Moto X Dashboard through a separate Nginx site/server block. Do not insert its routes into AndreaWeb's site or reuse AndreaWeb's business media storage. Future Moto media should use a dedicated durable path and backup boundary.
One-time server preparation¶
The release scripts expect:
/opt/motoxdashboard/
current -> releases/<commit>
releases/
shared/
production.env
artifacts/<commit>/
image.tar
source.tar
SHA256SUMS
The directory is created on the VPS, not in the local checkout. A one-time
reviewed privileged script creates it with deployment ownership for justin.
Nginx and certificates remain root-managed. shared/production.env must be
mode 0600 and must never enter Git. A minimal private environment begins with:
Shared sports activation¶
The checked-in definitions international-men-soccer and isu-football are
enabled and assigned to bedroom. isu-basketball remains disabled and
unassigned until a current-season free response is demonstrated. Whether this
configuration is live is recorded by the release receipt, not inferred from
this source configuration.
There are no DNS, ordinary Nginx or phone-token changes for these sources.
compose.prod.yaml maps MOTO_API_SPORTS_KEY to ApiSports__ApiKey, falling
back to the existing MOTO_API_SPORTS_BASEBALL_KEY when no shared override is
provided. Keep the key in the private environment file. Plain local dotnet
execution also requires a persistent absolute ApiSports__StateDirectory
outside Git; without usable state the collector makes no provider requests.
Compose mounts the named api-sports-state volume at
/var/lib/motoxdashboard/api-sports. The image initializes it with ownership
for the non-root app user. The root filesystem remains read-only, and card
PNGs are still memory-only. Rehearse volume permissions and restart accounting
before deployment. Preserve this volume during rollback and cleanup; do not
delete it to obtain new request credit. An older image may leave it unused.
Compose also mounts team-logo-cache at /var/lib/motoxdashboard/team-logos
and supplies TeamLogos__StateDirectory. The image initializes this directory
for app; no general writable release directory is required. Plain local
execution can set that option to an absolute writable directory outside Git.
Without it, game cards still render using abbreviations. The logo cache holds
at most 128 entries/16 MiB, revalidates weekly and cleans up unused entries
opportunistically. This is not an Nginx static-asset path.
Preserve both volumes during normal replacement and rollback. Unlike quota
state, logo entries are regenerable, but deleting them causes cold downloads
and temporary abbreviation fallbacks. An older image can leave the logo
volume unused. Do not use blanket docker compose down -v cleanup. Rehearse
the exact image with real logo decode, repeated rendering and production
resource limits before deploying; local visual proofs are not that gate.
The existing deployment procedure still builds locally and installs the exact tested image. Acceptance must include new provider fixtures, real access, rendered cards, quota behavior and container limits before activating these definitions. This documentation is not a production deployment receipt.
Baseball evaluation rollout¶
The deployed evaluation profile assigns separate Yankees cards to API-Sports
Baseball (TeamId 25) and BALLDONTLIE MLB (TeamId 19), with distinct
attribution. The old MLB Stats source is disabled and unassigned. The five-card
evaluation release was deployed on 2 October. The phone contract and device
credentials did not change.
The current profile instead selects postseason games from both providers, with a bounded multi-game feed and automatic bulletin budgeting. Its deployment is recorded below. Documentation publication itself does not change the running API. Maximum-card resource testing and repeated-update rehearsal remain release acceptance requirements; a smoke-tested image alone is not that evidence.
The private production.env needs MOTO_API_SPORTS_BASEBALL_KEY and
MOTO_BALLDONTLIE_BASEBALL_KEY in addition to its existing device hashes.
compose.prod.yaml maps them explicitly to the corresponding .NET options;
Compose's --env-file alone does not inject them. Never place raw keys in
appsettings.json, Git, an APK, a release receipt, or a shell argument. The
keys disclosed in chat are suitable for this bounded evaluation but should be
rotated before any longer-lived or wider deployment.
Read-only OVH probes on 2 October returned HTTP 200 from both providers. The
API-Sports date-only response included the next Yankees game; its observed
free plan denied a season=2026 filter. BALLDONTLIE returned a recent result
and next game with a nine-day, team-filtered query. These checks did not
activate either source in the public API. Before deployment, run the normal
format/build/test and script checks, then prepare a clean exact image. The
rehearsal helper requires MOTO_API_SPORTS_KEY_FILE and
MOTO_BALLDONTLIE_KEY_FILE pointing to private local key files; it passes
them through a short-lived Docker env file and removes that file afterward.
Its accelerated repeat/failure checks cover weather and news. Baseball keeps
quota-aware refresh floors, so the bounded rehearsal verifies each baseball
card and asset once, not repeated baseball updates or failure recovery within
minutes.
After reviewing the deployment plan and applying the exact image, verify both attributed sports slides and assets over authenticated public HTTPS, plus the unaffected weather/news cards, anonymous 401 and conditional 304. Inspect provider request counts and the container's memory/CPU/PID limits. A later end-user policy could choose one source and use the other as a controlled fallback; this evaluation intentionally shows both. Rollback must restore the previous image/source configuration and the prior private environment together.
Postseason deployment: 10 October 2026¶
The operator deployed commit c8da2218d19a66e72bb057ba05ae8e5c48746dfa
using the existing local-build, archive-transfer and container-install flow.
Checksums passed and the container became healthy on loopback port 8088.
A read-only check confirmed current points to
/opt/motoxdashboard/releases/c8da2218d19a, the recorded commit matches,
and the saved image configuration digest is
sha256:2e72eb8245b62c2af4c8e392287723d32a76533c4e7acaf5f69b11415c9c63a7.
No DNS or ordinary Nginx change was needed.
Both phones now have the current APK and retain their production credentials. The Play returned authenticated HTTPS 304 without ADB reverse; its verified cache contained weather, one game card from each baseball provider, NYT and Guardian, with 15-second cards and a 75-second bulletin budget. Longer bulletins and lap-boundary updates were checked with deterministic device fixtures; no new maximum-card container-resource or multi-hour soak result is claimed by this receipt.
For rollback, use retained dc7568c1e72b through the
configuration-aware procedure,
preserving current device credentials and matching provider configuration.
That image restores Yankees team-scoped selection. Verify public health,
authenticated manifests/assets and conditional requests before accepting the
rollback. No rollback was performed.
Dual Yankees evaluation deployment: 2 October 2026¶
The exact clean commit dc7568c1e72bd040fdabf5101f17cf9db4ab1ac5 was
prepared, rehearsed, and deployed as motoxdashboard-api:dc7568c1e72b.
The Docker image ID was
sha256:a3558bb4e18b833026e5fea0a31aab61f03bdc2c0cfb7f3602c589bfca022f70
in both the saved local release and the deployed image. The current symlink is
/opt/motoxdashboard/releases/dc7568c1e72b; the full commit is recorded in
shared/deployments/api.commit. No DNS, Nginx or certificate change was needed.
Before deployment, AndreaWeb returned HTTPS 200, all existing containers were healthy, the root filesystem had about 24 GB free, and about 2.5 GiB RAM was available. The exact saved image passed anonymous 401, authenticated 200/304, five real card and PNG hash checks, repeated weather/news publication, and a provider-network outage/recovery. Its kernel memory peak was 67,362,816 bytes under the 256 MiB cap; OOM counters stayed at zero. The rehearsal retained the 0.5 CPU and 128 PID limits. This bounded test does not establish live-game freshness or a multi-hour bedside soak.
The private production environment contains both provider keys; the existing
device hashes were preserved. The previous file is preserved
at /opt/motoxdashboard/shared/backups/pre-dual-providers-20261002/production.env.
The new public HTTPS manifest returned five distinct cards: Open-Meteo weather,
API-Sports Yankees, BALLDONTLIE Yankees, NYT, and Guardian. Anonymous requests
returned 401, conditional requests returned 304, and all five authenticated
PNG assets matched their declared SHA-256 hashes. Public readiness and AndreaWeb
HTTPS returned 200 after deployment. The XT1058, with no ADB reverse mapping,
completed a Dashboard lap through all five cards and began another lap.
Android commit 9be243c corrected the client-side bulletin cap, which had still
clamped the new 75-second server value to 60 seconds. The updated debug APK was
installed on the XT1058 without clearing its app data, and 33 on-device
instrumented tests passed. Dashboard rotation had already worked; this client
fix allows a scheduled five-card bulletin to reach its final card. The backend
image and private configuration were not changed by this APK update.
To roll back the evaluation, first review the saved environment against any
credentials added since this deployment. Restore a matching private environment
for retained release a47e94caab8c, verify its saved archive, and run that
release's scripts/install-release.sh as in
configuration-aware rollback.
Restore the prior environment and image together: the earlier image expects its
own provider configuration and will again lack a Yankees card because its MLB
Stats upstream returned 406. Do not restore the pre-dual environment blindly
if credentials changed later. Validate public 401/200/304, assets, AndreaWeb,
and both devices before moving the current symlink. No rollback was executed.
The credential value is a comma-separated list of
deviceId:profileId:sha256hex entries. compose.prod.yaml maps
MOTO_DEVICE_CREDENTIALS to the API's Dashboard__DeviceCredentials
setting; Compose's --env-file alone only interpolates variables.
DEVICE_ID is a stable label chosen by the operator, not an IMEI or ADB
serial. Existing labels include xt1058-bedroom and xt1563-bedroom.
Choose a unique label for each phone; bedroom is the current profile.
Generate a token with scripts/new-device-token.sh DEVICE_ID PROFILE_ID
TOKEN_FILE. The script writes the raw bearer token to a new mode-0600 file
and prints only the matching hash entry. Keep that file on the provisioning
workstation, not on the VPS or in Git. From WSL, use the following modes with
that same file:
bash scripts/provision-device-token.sh TOKEN_FILE
bash scripts/provision-device-token.sh -phone TOKEN_FILE
bash scripts/provision-device-token.sh -api DEVICE_ID bedroom TOKEN_FILE
bash scripts/provision-device-token.sh -phone -api DEVICE_ID bedroom TOKEN_FILE
The original one-argument call remains phone-only. With -api, the helper
sends only the SHA-256 hash over SSH to the VPS, verifies that the selected
device ID is new (or already matches exactly), appends it without replacing
other entries in /opt/motoxdashboard/shared/production.env, saves a private
backup, and recreates only the current API container with its retained
image. It checks loopback readiness and anonymous 401, and restores the prior
environment and API configuration if that restart fails. It refuses to replace
an existing ID with a different token; rotation remains a separate reviewed
operation. -phone -api registers the server first, then streams the raw
token over USB into the app's private storage. The bearer token never goes to
the VPS or into shell arguments/logs. Registration changes production state:
review the target and obtain authorization before running -api.
The phone mode uses Windows
/mnt/d/Android/Sdk/platform-tools/adb.exe automatically when run from WSL
on this machine. Linux adb is not the connected USB server here. Set ADB
explicitly only if that Windows SDK path changes; native Windows/Linux shells
otherwise use their adb on PATH. Phone provisioning requires a debuggable
APK for run-as. To revoke a device, remove its entry from the private
environment and restart the API. The provisioning helper intentionally does
not revoke or rotate credentials.
ADB is optional: tap the clock, open Connection, paste the token and tap Save. This also works with non-debug APKs. New APK installations contain no token; server-side hash registration is still required. Automatic enrollment and QR/short-code pairing are not implemented.
After a token is imported, a fresh app process is currently needed to recover from an already displayed authentication failure. Resume imports the token and requests a refresh, but the current presenter does not clear that failure state until it is recreated. Include this cold restart in token-rotation procedures.
Release workflow¶
Build on the local Windows/WSL machine using Docker Desktop's Linux engine,
not on the VPS. In WSL use the repository's Linux path. In Windows use a
native clone and Git Bash (the helpers are Bash scripts), not Windows Gradle
or build tools against a UNC path. SSH must resolve the ovh alias in that
environment; verify with ssh -o BatchMode=yes ovh hostname first.
Packaging also requires curl, tar, sha256sum, and jq. The saved image's
configuration digest is recorded as image.id, matching OVH's Docker 24 image
ID rather than Docker Desktop's containerd manifest-index ID.
Run the backend checks in Testing and quality before building a release. A standalone local packaging/rehearsal command is:
bash ./scripts/test-deployment-helpers.sh
bash ./scripts/test-prepare-release.sh
bash ./scripts/test-rehearse-release.sh
bash ./scripts/prepare-release.sh <commit> /absolute/private/releases/new-release
bash ./scripts/rehearse-release.sh /absolute/private/releases/new-release /absolute/private/rehearsals/new-report
The helper refuses a dirty tree, archives the exact commit, builds a
linux/amd64 image, starts a temporary constrained container on an ephemeral
loopback port, checks readiness and the dashboard route, then removes that
temporary container. It retains artifacts for inspection. image.tar is a
Docker save archive, not an executable, ZIP, OCI registry, or docker
export filesystem snapshot; load it with docker load -i image.tar.
The final image includes the ASP.NET runtime base layer and published DLLs; the SDK stays only in the build stage. No host .NET installation is needed. The currently referenced .NET base tags are mutable; the saved image and its recorded image ID are the rollback artifact, not a later rebuild of those tags.
Plan without changing local or remote state:
After reviewing and committing a clean tree:
The apply action builds and smoke-tests locally, transfers the source archive
and commit-tagged Docker image, verifies archive SHA-256 checksums, and loads
the image on the VPS. It starts the stable motoxdashboard Compose project
with --no-build --pull never, checks readiness, records the commit/image ID,
and only then moves current. It does not alter Nginx or delete old releases.
Automatic application CI/CD and commit gates remain deferred.
Local release preparation checks anonymous manifest denial (401), authenticated manifest delivery (200), and conditional-manifest reuse (304). A changed-ETag 200 between probes is retried at most five times because providers can publish during cold start; unchanged-ETag 200 and other failures remain errors. The VPS installer independently checks readiness and verifies that an anonymous manifest request returns 401 before it records the installed commit/image. It does not have the raw device token and does not probe authenticated assets or real provider content. Record public Nginx/API acceptance separately after an authorized rollout.
Frozen release candidate¶
Commit the reconciled implementation and scripts/rehearse-release.sh as code
commit A. Run scripts/prepare-release.sh A <new-absolute-output-directory>
once, then run the full release rehearsal against that saved image.tar.
Record its image ID, artifact directory, and results in the release-candidate
record in the PoC plan, then commit that record as
documentation-only commit B. B documents the exact artifact built from A;
it does not change the tested code identity.
scripts/deploy-ovh.sh apply --commit A builds a new image when run. It does
not deploy the already rehearsed tar byte-for-byte. A later deployment of the
frozen candidate must use A's preserved image.tar, source.tar,
commit.txt, image.id, and SHA256SUMS; do not run apply, which
builds a new image. Transfer those files to the VPS, verify them with
sha256sum -c SHA256SUMS, load the saved image using docker load -i image.tar,
and extract source.tar to the release directory for commit A. Run that
retained source tree's scripts/install-release.sh with the matching private
production.env and full commit A. Do not rebuild during installation.
Compare the loaded image's configuration digest with the preserved image.id
(OVH Docker 24 .Id, not Docker Desktop's manifest-index ID) before moving
current. After an authorized rollout, use the workstation-held token to
verify public anonymous 401, authenticated manifest and asset 200, conditional
304 responses, and cards from the expected real providers.
The installer does not move current. After the checks pass, the deployment
user explicitly runs ln -sfn /opt/motoxdashboard/releases/<short-commit>
/opt/motoxdashboard/current. Ordinary updates preserve the dedicated Nginx
proxy and do not rerun bootstrap. Preserve the previous link target and private
environment for a compatible rollback.
The initial bootstrap used a user-home staging directory until /opt was
prepared. Its reviewed privileged script installed the tested scaffold release,
then replaced only the dedicated site's placeholder with a proxy to
127.0.0.1:8088. Preserve HTTP ACME handling and the renewal hook. Run
nginx -t before reloading, use bounded retries after asynchronous reload,
verify both public health/manifest routes, and compare AndreaWeb configuration
checksums and HTTPS before/after. On failure restore the previous dedicated
site. That first rollout had no older API release; its rollback was the
placeholder plus stopping only the motoxdashboard API. Later rollback must
account for the authenticated provider release as described below.
The container is non-root, read-only, capability-free, and constrained to 256 MiB RAM, 0.5 CPU, and 128 PIDs. Docker JSON logs rotate at 5 MB with three files. These are the production scaffold limits; measure and review them against full provider refresh and rendering behavior before rollout. Host Nginx logs use the VPS's separate logrotate policy; Docker settings do not rotate Nginx logs. The API keeps current and two previous snapshots per profile in memory, including their PNG bytes. New publications evict older snapshots; responses already holding an asset reference may finish. There is no daily filesystem asset retention or cleanup job, and no Nginx static-assets location. Restarting discards snapshots; expired cards are omitted during recomposition. Android separately sweeps unreferenced cache/staging files within its 32 MiB bound while protecting its displayed generation. Photographs/music will require a separate durable-storage design, not an extension of this volatile cache.
Read-only operational commands:
Rollback uses a retained release and saved image, after verifying contract
and authentication compatibility. The previously deployed
b2221b742993db040467c92064877e83bbd83450 scaffold serves its schema-1
manifest anonymously (200); the provider release requires a device token
(anonymous requests return 401). Its older Compose configuration and installer
also predate MOTO_DEVICE_CREDENTIALS and the anonymous-401 assertion. A
rollback to that scaffold therefore restores an unauthenticated API contract.
Do not point the public Nginx site at it as an ordinary rollback: restore the
dedicated site's deliberate 503 placeholder (or keep the API otherwise
unreachable) before reactivating the scaffold, then separately decide how to
serve it safely. A rollback to another authenticated release can use that
release's own compatible configuration and installer.
For a compatible retained release, load its checked archive, run that release's
scripts/install-release.sh with the matching private environment and full
commit, verify health and the expected authentication behavior, then move
current to it. Do not rebuild during rollback or delete release directories
as a side effect. Retained image archives consume disk; explicit reviewed retention/cleanup is
a later operational task, not part of each deploy.
Acceptance boundary¶
Check https://retroapi.everybodypackit.com/health/ready and
https://retroapi.everybodypackit.com/api/v1/dashboard without bypassing TLS.
The old scaffold returned an empty manifest anonymously. For the deployed
provider release, require anonymous manifest 401, authorized manifest 200 with
the expected live cards, conditional manifest 304, and authorized asset 200
and 304. Verify Android 5.1 transport with the actual device as a separate
acceptance check; desktop HTTPS success does not prove its trust store accepts
the chain. Production release, Nginx activation, and Android token provisioning
remain separate authorized operations.