An easy way to have a 24/7 audio stream of music.

Setting for mountpoint name; Set encoding to UTF-8

Also add env to change the relay password and the hostname in Icecast

+4 -1
.env.example
···
ICECAST_PORT=8000
ICECAST_SOURCE_PASSWORD=ASourcePassword
ICECAST_ADMIN_PASSWORD=AnAdminPassword
STREAM_NAME=Radio
STREAM_DESC=Our selection of music
-
STREAM_URL=https://google.com
···
ICECAST_PORT=8000
ICECAST_SOURCE_PASSWORD=ASourcePassword
ICECAST_ADMIN_PASSWORD=AnAdminPassword
+
ICECAST_RELAY_PASSWORD=APasswordForRelaysIGuess
+
ICECAST_HOSTNAME=localhost
STREAM_NAME=Radio
STREAM_DESC=Our selection of music
+
STREAM_URL=https://google.com
+
STREAM_MOUNTPOINT=live
+6 -3
README.md
···
## Install
- Copy `.env.example` to `.env` and edit it
- Put music inside `music/`
-
- Run `docker-compose up -d --build`
- Listen to `http://localhost:8000/live` (if you changed `ICECAST_PORT`, edit the port in the URL)
## Config
-
Everything is set in the `.env` file (or your shell environment).
-
All settings are optional but please set the two passwords or it will stay to the default, `hackme`.
- `ICECAST_PORT`: The port to bind Icecast in the open.
- `ICECAST_SOURCE_PASSWORD`: The password to stream audio to Icecast.
- `ICECAST_ADMIN_PASSWORD`: The password for Icecast's administration.
- `STREAM_NAME`: A title for your stream.
- `STREAM_DESC`: A description for your stream.
- `STREAM_URL`: A URL (like your website) to show on the stream details.
···
## Install
- Copy `.env.example` to `.env` and edit it
- Put music inside `music/`
+
- Run `docker-compose up -d`
- Listen to `http://localhost:8000/live` (if you changed `ICECAST_PORT`, edit the port in the URL)
## Config
+
Everything is set in the `.env` file (or in your shell environment).
+
All settings are optional but please set the passwords or they will stay to the default, `hackme`.
- `ICECAST_PORT`: The port to bind Icecast in the open.
- `ICECAST_SOURCE_PASSWORD`: The password to stream audio to Icecast.
- `ICECAST_ADMIN_PASSWORD`: The password for Icecast's administration.
+
- `ICECAST_RELAY_PASSWORD`: The password for Icecast's relays.
+
- `ICECAST_HOSTNAME`: The hostname of your Icecast installation.
- `STREAM_NAME`: A title for your stream.
- `STREAM_DESC`: A description for your stream.
- `STREAM_URL`: A URL (like your website) to show on the stream details.
+
- `STREAM_MOUNTPOINT`: The name of the mountpoint that Liquidsoap will use.
+4 -1
docker-compose.yml
···
environment:
- ICECAST_SOURCE_PASSWORD
- ICECAST_ADMIN_PASSWORD
liquidsoap:
image: "phasecorex/liquidsoap"
···
- STREAM_NAME
- STREAM_DESC
- STREAM_URL
depends_on:
- icecast
volumes:
- ./music:/music:ro
-
- ./script.liq:/script.liq:ro
···
environment:
- ICECAST_SOURCE_PASSWORD
- ICECAST_ADMIN_PASSWORD
+
- ICECAST_RELAY_PASSWORD
+
- ICECAST_HOSTNAME
liquidsoap:
image: "phasecorex/liquidsoap"
···
- STREAM_NAME
- STREAM_DESC
- STREAM_URL
+
- STREAM_MOUNTPOINT
depends_on:
- icecast
volumes:
- ./music:/music:ro
+
- ./script.liq:/script.liq:ro
+6 -2
script.liq
···
if getenv("STREAM_DESC") == "" then
setenv("STREAM_DESC", "Our selection of music")
end
# Playlist
i_playlist = normalize(
···
name = getenv("STREAM_NAME"),
description = getenv("STREAM_DESC"),
url = getenv("STREAM_URL"),
-
mount = "live",
password = getenv("ICECAST_SOURCE_PASSWORD"),
host = "icecast",
port = 8000,
radio
-
)
···
if getenv("STREAM_DESC") == "" then
setenv("STREAM_DESC", "Our selection of music")
end
+
if getenv("STREAM_MOUNTPOINT") == "" then
+
setenv("STREAM_MOUNTPOINT", "live")
+
end
# Playlist
i_playlist = normalize(
···
name = getenv("STREAM_NAME"),
description = getenv("STREAM_DESC"),
url = getenv("STREAM_URL"),
+
mount = getenv("STREAM_MOUNTPOINT"),
password = getenv("ICECAST_SOURCE_PASSWORD"),
host = "icecast",
port = 8000,
+
encoding = "UTF-8",
radio
+
)