Caddy takes nginx's place in compose: ports 80/443, the fixed address 172.28.255.251 that cloudflared pins the public names to, the network aliases, the healthcheck and the autoheal label. nginx and certbot are removed from compose; Caddy already holds its own certificates in ./caddy/data, obtained while it ran beside nginx. `traffic` now tails logs/caddy/payloads.log, and the dev override switches Caddy to its dev sites instead of putting nginx in DEV_MODE. Docs and comments that described nginx's behaviour now describe Caddy's: CLAUDE.md, DEPLOYMENT.md (topology, boot paths, TLS, rate limits, runbook with a rollback, rough edges), the READMEs, .env.example and the comments in the backend, Python service, Vue source and infra files. nginx/ and certbot/ stay in the repo as the rollback until this has settled. Co-Authored-By: Claude Opus 5.5 <[email protected]>
56 lines
2.6 KiB
Plaintext
56 lines
2.6 KiB
Plaintext
# =============================================================================
|
|
# stream.liq.template — liquidsoap source script for the internet radio.
|
|
#
|
|
# RENDERED BY icecast2/entrypoint.sh with bare envsubst into
|
|
# /etc/liquidsoap/stream.liq at container start. Every VAR placeholder below comes from
|
|
# ./.env; an unset one silently becomes an empty string.
|
|
#
|
|
# WHAT IT BUILDS, bottom of the fallback chain upward:
|
|
# blank() - digital silence; the last resort so the mount is never dropped.
|
|
# music - the fallback playlist read from the /music bind mount
|
|
# (./icecast2/fallback_music on the host). reload_mode="watch"
|
|
# means adding or removing an MP3 on the host is picked up live,
|
|
# with no container restart.
|
|
# live - a *harbor* input: liquidsoap itself listens on
|
|
# LIQUIDSOAP_HARBOR_PORT and accepts an incoming source
|
|
# connection. This is the "go live" path — a broadcasting client
|
|
# on the LAN/internet connects with ICECAST_SOURCE_PASSWORD and
|
|
# starts talking. It is the one reason icecast2 publishes a host
|
|
# port in docker-compose.yml.
|
|
#
|
|
# fallback(track_sensitive=false, [live, music, blank()])
|
|
# Picks the first available source in list order, so a live DJ pre-empts
|
|
# the playlist automatically. track_sensitive=false is the important flag:
|
|
# it makes the switch happen IMMEDIATELY rather than politely waiting for
|
|
# the current track to finish — otherwise going live could take minutes.
|
|
#
|
|
# amplify(0.7, ...) - a fixed -3dB or so trim, because the fallback MP3s are
|
|
# mastered loud and were clipping against the live input.
|
|
#
|
|
# OUTPUT
|
|
# Pushes to icecast on localhost (same container) at ICECAST_MOUNT, which is
|
|
# what Caddy exposes at /radio/. fallible=true tells liquidsoap this output
|
|
# is allowed to fail and be retried, instead of aborting the script — that is
|
|
# what makes the `sleep 2` startup race in the entrypoint survivable.
|
|
#
|
|
# settings.server.telnet := false — the liquidsoap control socket is off; there
|
|
# is no interactive way to poke the running stream.
|
|
# =============================================================================
|
|
settings.server.telnet := false
|
|
|
|
music = playlist("/music", mode="randomize", reload_mode="watch")
|
|
|
|
live = input.harbor("${LIQUIDSOAP_HARBOR_MOUNT}", port=${LIQUIDSOAP_HARBOR_PORT}, password="${ICECAST_SOURCE_PASSWORD}")
|
|
|
|
radio = amplify(0.7, fallback(track_sensitive=false, [live, music, blank()]))
|
|
|
|
output.icecast(
|
|
%mp3,
|
|
host="localhost",
|
|
port=${ICECAST_PORT},
|
|
password="${ICECAST_SOURCE_PASSWORD}",
|
|
mount="${ICECAST_MOUNT}",
|
|
fallible=true,
|
|
radio
|
|
)
|