parent
5f2f434716
commit
86c8231fc6
@ -0,0 +1,16 @@
|
||||
FROM savonet/liquidsoap-alpine:v2.1.4
|
||||
|
||||
USER root
|
||||
|
||||
RUN apk add tzdata
|
||||
RUN cp /usr/share/zoneinfo/Europe/Moscow /etc/localtime
|
||||
RUN echo "Europe/Moscow" > /etc/timezone
|
||||
|
||||
RUN mkdir -p /home/stream
|
||||
RUN mkdir -p /home/stream/music
|
||||
RUN chown -R liquidsoap:liquidsoap /home/stream
|
||||
|
||||
USER liquidsoap
|
||||
COPY main.liq /home/stream/script.liq
|
||||
|
||||
CMD ["/home/stream/script.liq"]
|
||||
@ -0,0 +1,18 @@
|
||||
STORAGE_URL = gitea.bjornmossa.net
|
||||
IMAGE_NAME = $(STORAGE_URL)/radioiceberg/liquidsoap
|
||||
GIT_TAG = $(shell git describe --abbrev=0 --tags)
|
||||
|
||||
login:
|
||||
docker login $(STORAGE_URL)
|
||||
|
||||
build:
|
||||
docker build . -t $(IMAGE_NAME):$(GIT_TAG)
|
||||
|
||||
bump-latest:
|
||||
docker tag $(IMAGE_NAME):$(GIT_TAG) $(IMAGE_NAME):latest
|
||||
|
||||
push-current: login
|
||||
docker push $(IMAGE_NAME):$(GIT_TAG)
|
||||
|
||||
push-latest: login
|
||||
docker push $(IMAGE_NAME):latest
|
||||
@ -0,0 +1,33 @@
|
||||
#!/usr/bin/liquidsoap
|
||||
|
||||
settings.harbor.bind_addrs.set(["0.0.0.0"])
|
||||
enable_replaygain_metadata()
|
||||
|
||||
def print_meta(data)
|
||||
artist = data["artist"]
|
||||
title = data["title"]
|
||||
|
||||
meta = json()
|
||||
meta.add("artist", artist)
|
||||
meta.add("title", title)
|
||||
|
||||
http.post(data=meta.stringify(), headers=[("Content-Type", "application/json; charset=UTF-8")], "metadata:4000")
|
||||
()
|
||||
end
|
||||
|
||||
security = synth.all.sine(id="sine")
|
||||
main_air_playlist = playlist("/music/main_air.pls")
|
||||
general_playlist = replaygain(random([main_air_playlist]))
|
||||
general_stream = normalize(crossfade(general_playlist))
|
||||
live_stream = input.harbor("iceberg-live", port=6000, user="djiceberg", password="hackme")
|
||||
|
||||
radio = fallback(track_sensitive = false, [live_stream, general_stream, security])
|
||||
|
||||
radio.on_metadata(print_meta)
|
||||
|
||||
output.icecast(%mp3,
|
||||
host = "icecast",
|
||||
port = 8000,
|
||||
password = "hackme",
|
||||
mount = "iceberg.ogg",
|
||||
radio)
|
||||
Reference in new issue