Files
wadamesh/deploy/nginx/firmware.wadamesh.com.conf
T
Kaj SchittecatandClaude Opus 4.8 18904c9a5d deploy(nginx): serve the TEST/BETA channel paths on firmware.wadamesh.com
The two-channel rollout added releases/BETA + latest-beta, but the firmware
vhost only had exact-match handling for the old stable paths. Add:
- location = /releases/BETA  -> serves releases/BETA/index.json at the no-slash
  path the device requests when 'Get test builds (beta)' is on (mirrors TOUCH).
- location /latest-beta/      -> the beta web-flasher feed (was hitting the 404
  catch-all).

Stable paths and all bins under /releases/ were already correct; this only wires
up the new beta directory-index + feed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 17:47:46 +02:00

74 lines
3.1 KiB
Plaintext

# firmware.wadamesh.com — wadamesh firmware bins + the update-check feed.
#
# Layout on disk (populated by scripts/release.sh, rsynced to the VPS):
# /srv/wadamesh/firmware/
# releases/TOUCH/index.json <- listing the firmware scans for beta_<N>
# releases/TOUCH/beta_1/wadamesh-heltec-v4-tft.bin
# releases/TOUCH/beta_1/wadamesh-heltec-v4-tft-merged.bin
# releases/TOUCH/beta_1/wadamesh-tdeck.bin
# releases/TOUCH/beta_1/wadamesh-tdeck-merged.bin
#
# The on-device version check GETs http://firmware.wadamesh.com/releases/TOUCH and
# scans the body for the highest beta_<N>. We serve index.json at exactly that
# path (no trailing-slash redirect, which the on-device HTTPClient may not follow).
#
# Cloudflare: firmware.wadamesh.com proxied; SSL "Full". Plain HTTP must remain
# reachable (the firmware checks over HTTP) — do NOT force HTTPS on this host.
# Cache Rule: cache .bin aggressively (Edge TTL ~1d); index.json short TTL (~60s)
# or bypass, so a new release shows up promptly.
server {
listen 80;
listen [::]:80;
server_name firmware.wadamesh.com;
root /srv/wadamesh/firmware;
# The update-check feed — served at the no-slash path the firmware requests.
# STABLE channel (the default on-device update check).
location = /releases/TOUCH {
default_type application/json;
alias /srv/wadamesh/firmware/releases/TOUCH/index.json;
add_header Cache-Control "public, max-age=60";
}
# Same, for the opt-in TEST/BETA channel — what a device requests when the
# "Get test builds (beta)" switch is on. Without this exact-match the no-slash
# path 301-redirects to a dir with no index and the beta check comes back empty.
location = /releases/BETA {
default_type application/json;
alias /srv/wadamesh/firmware/releases/BETA/index.json;
add_header Cache-Control "public, max-age=60";
}
# Bins + everything else under /releases/. CORS so the browser flasher
# (flasher.wadamesh.com) can fetch the images cross-origin.
location /releases/ {
autoindex off;
types { application/octet-stream bin; }
add_header Cache-Control "public, max-age=86400";
add_header Access-Control-Allow-Origin "*";
}
# Rolling "latest" merged images — the web flasher's manifests point here so
# they always install the newest build (release.sh refreshes this dir). STABLE.
location /latest/ {
autoindex off;
types { application/octet-stream bin; }
add_header Cache-Control "public, max-age=300";
add_header Access-Control-Allow-Origin "*";
}
# Rolling "latest" for the TEST/BETA channel — the beta web-flasher feed
# (version.json + manifests + rolling bins). Without this it falls to the
# catch-all 404 and the flasher's beta toggle can't load metadata.
location /latest-beta/ {
autoindex off;
types { application/octet-stream bin; }
add_header Cache-Control "public, max-age=300";
add_header Access-Control-Allow-Origin "*";
}
location / { return 404; }
}