Self-contained, no-JS landing page (tinygrad-minimal) that doubles as the artifact download host, served by Caddy on an internal :80 box. - site/index.html: static page, "Same tool, only a little different", feature highlights (remote->remote, symmetric panels, ssh_config awareness, edit-in- place, self-copy guard, ...), fixed stable download links, FAQ (unsigned notes). - site/Caddyfile: one flat /dl/ folder with browse + range requests and per-type Cache-Control (patches immutable, update.json no-cache, installers short). - site/deploy.sh: drop a build's artifacts/stable-* into /dl/ (renames the win portable zip to a stable name). - Flat folder matches electrobun's artifacts/ layout, so it's also the future updater baseUrl; per-build folders/symlink dropped in favor of it. - docs/build-and-release.md: document the download host + deploy flow. Verified: caddy validate + live smoke test (links, cache headers, 206 range, 404 fallback, deploy.sh copy/rename) against a temp root. Co-Authored-By: Claude <noreply@anthropic.com>
35 lines
1.1 KiB
Caddyfile
35 lines
1.1 KiB
Caddyfile
# miniSCP landing page + artifact host.
|
|
# Local / internal, plain HTTP on :80 (no domain, no TLS).
|
|
# Deploy target is /srv/miniscp — see site/README.md.
|
|
|
|
:80 {
|
|
root * /srv/miniscp
|
|
encode zstd gzip
|
|
|
|
# Flat artifact feed: these files are BOTH the human downloads AND (later) the
|
|
# electrobun updater baseUrl. Publishing a build = drop its artifacts/ files here;
|
|
# stable-named installers overwrite in place, hashed .patch files accumulate.
|
|
handle /dl/* {
|
|
# Incremental update patches have unique hashed names → cache forever.
|
|
@patch path *.patch
|
|
header @patch Cache-Control "public, max-age=31536000, immutable"
|
|
|
|
# The updater feed must always reflect the newest published version.
|
|
@feed path *update.json
|
|
header @feed Cache-Control "no-cache"
|
|
|
|
# Installers/payloads keep stable names but get overwritten each release.
|
|
@pkg path *.dmg *.zip *.tar.zst
|
|
header @pkg Cache-Control "public, max-age=300"
|
|
|
|
# browse => directory listing; file_server serves range requests
|
|
# (resumable large .dmg downloads) by default.
|
|
file_server browse
|
|
}
|
|
|
|
# Static landing page + assets. No SPA index fallback: unknown paths 404.
|
|
handle {
|
|
file_server
|
|
}
|
|
}
|