adding icecast

This commit is contained in:
2025-11-24 13:07:51 +00:00
parent b5f72a9ada
commit 4de50b4b3f
5 changed files with 52 additions and 12 deletions

10
icecast/Dockerfile Normal file
View File

@@ -0,0 +1,10 @@
FROM pltnk/icecast2
# Copy template + entrypoint into image
COPY icecast.xml.template /etc/icecast2/icecast.xml.template
COPY entrypoint.sh /entrypoint.sh
# Ensure script is executable
RUN chmod +x /entrypoint.sh
ENTRYPOINT [ "entrypoint.sh" ]

8
icecast/entrypoint.sh Normal file
View File

@@ -0,0 +1,8 @@
#!/bin/sh
set -e
# Substitute environment variables into template
envsubst < /etc/icecast2/icecast.xml.template > /etc/icecast2/icecast.xml
# Run icecast with the generated config
exec icecast -c /etc/icecast2/icecast.xml

View File

View File

@@ -0,0 +1,27 @@
<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>
<listen-socket>
<port>${ICECAST_PORT}</port>
</listen-socket>
<mount>
<mount-name>${ICECAST_MOUNT}</mount-name>
</mount>
<limits>
<clients>100</clients>
<sources>2</sources>
</limits>
<security>
<chroot>0</chroot>
</security>
</icecast>