From bfd8a2f91ac4a310f35ea2f74a5309d53007039a Mon Sep 17 00:00:00 2001 From: Kody Date: Wed, 6 Sep 2023 09:57:48 +0200 Subject: [PATCH] Upgrade to Liquidsoap v2.2.1 --- README.md | 4 ++-- docker-compose.yml | 8 +++----- script.liq | 24 +++++------------------- 3 files changed, 10 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 49d4406..af123e5 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ ## Install - Copy `.env.example` to `.env` and edit it - Put music inside `music/` -- Run `docker-compose up -d` +- Run `docker compose up -d` - Listen to `http://localhost:8000/live` - Change `8000` with your `ICECAST_PORT`, `live` with your `STREAM_MOUNTPOINT` @@ -19,7 +19,7 @@ All settings are optional but please set the passwords or they will stay to the - `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_URL`: An URL (like your website) to show on the stream details. - `STREAM_MOUNTPOINT`: The name of the mountpoint that Liquidsoap will use. - `ICECAST_PORT`: The port to bind Icecast in the open. - `ICECAST_SOURCE_PASSWORD`: The password to stream audio to Icecast. diff --git a/docker-compose.yml b/docker-compose.yml index 742b945..a53a44d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,8 +1,8 @@ -version: '3' +version: "3.6" services: icecast: - image: "mkody/icecast" + image: docker.io/mkody/icecast:latest restart: always ports: - "${ICECAST_PORT:-8000}:8000" @@ -13,11 +13,9 @@ services: - ICECAST_HOSTNAME - ICECAST_MAX_SOURCES - ICECAST_CHARSET - volumes: - - ./logs:/var/log/icecast liquidsoap: - image: "savonet/liquidsoap:v2.1.3" + image: docker.io/savonet/liquidsoap:v2.2.1 restart: always command: ["/script.liq"] environment: diff --git a/script.liq b/script.liq index 8d1162b..5370a60 100644 --- a/script.liq +++ b/script.liq @@ -2,20 +2,6 @@ # Allow root settings.init.allow_root.set(true) -# Set environments if empty -if getenv("ICECAST_SOURCE_PASSWORD") == "" then - setenv("ICECAST_SOURCE_PASSWORD", "hackme") -end -if getenv("STREAM_NAME") == "" then - setenv("STREAM_NAME", "Radio") -end -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 = crossfade( duration=3.0, @@ -42,11 +28,11 @@ output.icecast( bitrate=128, id3v2=true ), - name=getenv("STREAM_NAME"), - description=getenv("STREAM_DESC"), - url=getenv("STREAM_URL"), - mount=getenv("STREAM_MOUNTPOINT"), - password=getenv("ICECAST_SOURCE_PASSWORD"), + name=environment.get("STREAM_NAME", default="Radio"), + description=environment.get("STREAM_DESC", default="Our selection of music"), + url=environment.get("STREAM_URL"), + mount=environment.get("STREAM_MOUNTPOINT", default="live"), + password=environment.get("ICECAST_SOURCE_PASSWORD", default="hackme"), host="icecast", port=8000, encoding="UTF-8", -- 2.51.2