diff --git a/docker/Dockerfile.icecast b/docker/Dockerfile.icecast
index ae48326..14aa89d 100644
--- a/docker/Dockerfile.icecast
+++ b/docker/Dockerfile.icecast
@@ -5,7 +5,7 @@ COPY icecast-entrypoint.sh /usr/local/bin/icecast-entrypoint.sh
RUN chmod +x /usr/local/bin/icecast-entrypoint.sh
# Copy base config and YP snippet
-COPY icecast.xml.base /etc/icecast.xml.base
-COPY icecast-yp.xml.snippet /etc/icecast-yp.xml.snippet
+COPY icecast-base.xml /etc/icecast-base.xml
+COPY icecast-yp-snippet.xml /etc/icecast-yp-snippet.xml
ENTRYPOINT ["/usr/local/bin/icecast-entrypoint.sh"]
diff --git a/docker/asteroid-radio-docker.liq b/docker/asteroid-radio-docker.liq
index 71cc8c6..61ad2d7 100644
--- a/docker/asteroid-radio-docker.liq
+++ b/docker/asteroid-radio-docker.liq
@@ -25,6 +25,9 @@ settings.server.telnet.set(true)
settings.server.telnet.port.set(1234)
settings.server.telnet.bind_addr.set("0.0.0.0")
+# Station URL for YP directory listings (defaults to localhost for dev)
+station_url = environment.get("STATION_URL") ?? "http://localhost:8080/asteroid/"
+
# =============================================================================
# CURATED STREAM (Low Orbit) - Sequential playlist
# =============================================================================
@@ -83,7 +86,7 @@ output.icecast(
name="Asteroid Radio",
description="Music for Hackers - Streaming from the Asteroid",
genre="Electronic/Alternative",
- url="http://localhost:8080/asteroid/",
+ url=station_url,
public=true,
radio
)
@@ -98,7 +101,7 @@ output.icecast(
name="Asteroid Radio (AAC)",
description="Music for Hackers - High efficiency AAC stream",
genre="Electronic/Alternative",
- url="http://localhost:8080/asteroid/",
+ url=station_url,
public=true,
radio
)
@@ -113,7 +116,7 @@ output.icecast(
name="Asteroid Radio (Low Quality)",
description="Music for Hackers - Low bandwidth stream",
genre="Electronic/Alternative",
- url="http://localhost:8080/asteroid/",
+ url=station_url,
public=true,
radio
)
@@ -159,7 +162,7 @@ output.icecast(
name="Asteroid Radio (Shuffle)",
description="Music for Hackers - Random shuffle from the library",
genre="Electronic/Alternative",
- url="http://localhost:8080/asteroid/",
+ url=station_url,
public=true,
shuffle_radio
)
diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml
index 7e6205f..b4b80f5 100644
--- a/docker/docker-compose.yml
+++ b/docker/docker-compose.yml
@@ -11,6 +11,7 @@ services:
- ICECAST_ADMIN_PASSWORD=asteroid_admin_2024
- ICECAST_RELAY_PASSWORD=asteroid_relay_2024
- ICECAST_ENABLE_YP=${ICECAST_ENABLE_YP:-false}
+ - ICECAST_HOSTNAME=${ICECAST_HOSTNAME:-localhost}
restart: unless-stopped
networks:
- asteroid-network
@@ -24,6 +25,8 @@ services:
- "127.0.0.1:1234:1234"
depends_on:
- icecast
+ environment:
+ - STATION_URL=${STATION_URL:-http://localhost:8080/asteroid/}
volumes:
- ${MUSIC_LIBRARY:-../music/library}:/app/music:ro
- ./asteroid-radio-docker.liq:/app/asteroid-radio.liq:ro
diff --git a/docker/environment.sh.template b/docker/environment.sh.template
index f5d6cba..6c2dae3 100755
--- a/docker/environment.sh.template
+++ b/docker/environment.sh.template
@@ -21,3 +21,8 @@ export ASTEROID_DB_PASSWORD=asteroid_db_2025
# Production should set this to the public hostname
# Dev defaults to 'localhost' if unset
# export ICECAST_HOSTNAME=ice.asteroid.radio
+
+# Station URL (shown in YP directory listings as the station website)
+# This is what listeners click to visit the station
+# Dev defaults to 'http://localhost:8080/asteroid/'
+# export STATION_URL=https://asteroid.radio
diff --git a/docker/icecast.xml.base b/docker/icecast-base.xml
similarity index 100%
rename from docker/icecast.xml.base
rename to docker/icecast-base.xml
diff --git a/docker/icecast-entrypoint.sh b/docker/icecast-entrypoint.sh
index 90990d3..7099c2a 100644
--- a/docker/icecast-entrypoint.sh
+++ b/docker/icecast-entrypoint.sh
@@ -4,7 +4,7 @@
# - Substitute hostname (defaults to localhost for dev)
# - If ICECAST_ENABLE_YP=true, insert YP directory blocks
-cp /etc/icecast.xml.base /etc/icecast.xml
+cp /etc/icecast-base.xml /etc/icecast.xml
# Set hostname (defaults to localhost if not specified)
ICECAST_HOSTNAME=${ICECAST_HOSTNAME:-localhost}
@@ -14,7 +14,7 @@ sed -i "s|localhost|$ICECAST_HOSTNAME|
if [ "$ICECAST_ENABLE_YP" = "true" ]; then
echo "YP directory publishing ENABLED"
# Insert YP config before closing tag
- sed -i 's||'"$(cat /etc/icecast-yp.xml.snippet)"'\n|' /etc/icecast.xml
+ sed -i 's||'"$(cat /etc/icecast-yp-snippet.xml)"'\n|' /etc/icecast.xml
else
echo "YP directory publishing DISABLED (dev mode)"
fi
diff --git a/docker/icecast-yp.xml.snippet b/docker/icecast-yp-snippet.xml
similarity index 100%
rename from docker/icecast-yp.xml.snippet
rename to docker/icecast-yp-snippet.xml