Add a featured live ServerCard to the landing (replaces the static ServerListPanel in hero + status sections): server favicon, color MOTD, online/offline pill, players online/max with fill bar, and a player-head row rendered by our own NMSR from Drasl skins. Progressive enhancement — SSG skeleton degrades gracefully when JS or the API is unavailable. Back it with a self-hosted pinger instead of the public api.mcstatus.io: mcstatus.io's API service is closed-source (only the mcutil library is open), so docker/mc-status wraps mcutil and re-emits its v2 JSON shape, keeping the frontend unchanged. The service ignores the path address and only pings MC_STATUS_TARGET (no SSRF relay), with a 30s TTL cache. Exposed same-origin via caddy at the apex /api/mcstatus/* path (no new DNS subdomain or LE cert change, no CORS). Uptime Kuma stays the uptime history + alerting backend; see plan/15-mc-status.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
21 lines
684 B
Plaintext
21 lines
684 B
Plaintext
# Apex — landing page (/srv/www) + launcher downloads (/srv/launcher).
|
|
http://{$BASE_DOMAIN} {
|
|
# Launcher downloads are a sibling mount (/srv/launcher), not nested under
|
|
# the read-only /srv/www. handle_path strips the /launcher prefix.
|
|
handle_path /launcher/* {
|
|
root * /srv/launcher
|
|
file_server browse
|
|
}
|
|
# Self-hosted Minecraft status JSON (mc-status service). Same-origin, so the
|
|
# landing's ServerCard fetch needs no CORS. The <addr> in the path is
|
|
# ignored by mc-status — it only ever pings its configured MC_STATUS_TARGET.
|
|
handle /api/mcstatus/* {
|
|
uri strip_prefix /api/mcstatus
|
|
reverse_proxy mc-status:8080
|
|
}
|
|
handle {
|
|
root * /srv/www
|
|
file_server
|
|
}
|
|
}
|