Readability pass across all four areas of the stack. Comments explain why rather than what, concentrated at the points where behaviour is non-obvious: concurrency, caching, auth, scraping and nginx templating. Backend: doc comments on every exported declaration across handlers, services, models and resolvers. Resolver commentary lives inside function bodies so gqlgen does not strip it on regeneration; schema files use # comments rather than description blocks so introspection output is unchanged. Extracted the duplicated auth-cookie blocks into helpers. Frontend: header comments on every component, store and view, including STATUS: notes marking which of the parallel/legacy views are still live. Documented the non-reactive animation-state pattern, the homeData hub and the WebSocket stale-socket guard. Removed a few dead imports and named the reconnect-backoff and poll-interval constants. Python: module and function docstrings covering the Travelodge scraping contract, the deadline threading, the two-executor concurrency and the NDJSON streaming protocol. Infra: header blocks on every compose file, nginx template, Dockerfile and entrypoint, covering the config selection, envsubst allow-lists, rate-limit semantics and volume persistence. Hoisted the duplicated envsubst variable list in nginx/entrypoint.sh. New: backend/README.md, python/README.md, DEPLOYMENT.md, .env.example, backend/graph/doc.go. Refreshed vue/README.md. Corrected CLAUDE.md, which stated a 24h access token where main.go sets 7 days. No behaviour change. go build/vet, vite build, py_compile and docker compose config all pass. Co-Authored-By: Claude Opus 5 <[email protected]>
69 lines
2.7 KiB
Plaintext
69 lines
2.7 KiB
Plaintext
<!--
|
|
=============================================================================
|
|
icecast.xml.template — icecast2 server config.
|
|
|
|
RENDERED BY icecast2/entrypoint.sh with bare envsubst into
|
|
/etc/icecast2/icecast.xml at container start. Every VAR placeholder comes from ./.env,
|
|
which is how the four passwords stay out of git. An unset variable becomes an
|
|
EMPTY password rather than an error, so verify .env is complete after any
|
|
change to it.
|
|
|
|
THE FOUR CREDENTIALS, and who uses each:
|
|
source-password - liquidsoap uses it to push the stream in, and the live
|
|
DJ client uses the same value against the liquidsoap
|
|
harbor port. Anyone with it can take over the station.
|
|
relay-password - for a downstream icecast relaying this stream.
|
|
admin-user /
|
|
admin-password - the icecast web admin UI. Reachable through the /radio/
|
|
proxy, so treat it as internet-facing.
|
|
|
|
OTHER NOTES:
|
|
<alias source="/" destination="/status.xsl"/> makes the bare /radio/ URL
|
|
show the status page instead of a 404.
|
|
<sources>2</sources> is the minimum that works: one slot for the liquidsoap
|
|
output and one spare for a reconnect overlapping the old connection.
|
|
Lowering it to 1 causes reconnect failures.
|
|
<chroot>0</chroot> — no chroot, because the container already provides the
|
|
isolation and the process does not run as root.
|
|
Listener cap is 100, which is far above what a Raspberry Pi's uplink can
|
|
actually sustain; it is a safety ceiling, not a target.
|
|
=============================================================================
|
|
-->
|
|
<icecast>
|
|
<authentication>
|
|
<source-password>${ICECAST_SOURCE_PASSWORD}</source-password>
|
|
<relay-password>${ICECAST_RELAY_PASSWORD}</relay-password>
|
|
<admin-user>${ICECAST_ADMIN_USER}</admin-user>
|
|
<admin-password>${ICECAST_ADMIN_PASSWORD}</admin-password>
|
|
</authentication>
|
|
|
|
<hostname>${ICECAST_HOST}</hostname>
|
|
<location>London, UK</location> <!-- e.g., "London, UK" -->
|
|
<admin>[email protected]</admin>
|
|
|
|
<listen-socket>
|
|
<port>${ICECAST_PORT}</port>
|
|
</listen-socket>
|
|
|
|
<mount>
|
|
<mount-name>${ICECAST_MOUNT}</mount-name>
|
|
</mount>
|
|
|
|
<limits>
|
|
<clients>100</clients>
|
|
<sources>2</sources>
|
|
</limits>
|
|
|
|
<paths>
|
|
<basedir>/usr/share/icecast2</basedir>
|
|
<logdir>/var/log/icecast2</logdir>
|
|
<webroot>/usr/share/icecast2/web</webroot>
|
|
<adminroot>/usr/share/icecast2/admin</adminroot>
|
|
<alias source="/" destination="/status.xsl"/>
|
|
</paths>
|
|
|
|
<security>
|
|
<chroot>0</chroot>
|
|
</security>
|
|
</icecast>
|