-
Notifications
You must be signed in to change notification settings - Fork 487
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
202 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#+++++++++++++++++++++++++++++++++++++++ | ||
# Dockerfile for webdevops/liquidsoap:latest | ||
# -- automatically generated -- | ||
#+++++++++++++++++++++++++++++++++++++++ | ||
|
||
FROM webdevops/base:latest | ||
|
||
# Install services | ||
RUN /usr/local/bin/apt-install \ | ||
liquidsoap \ | ||
liquidsoap-plugin-all \ | ||
mplayer \ | ||
gstreamer0.10-plugins-base \ | ||
gstreamer0.10-plugins-good \ | ||
&& /usr/local/bin/docker-image-cleanup | ||
|
||
ENV LIQUIDSOAP_USER "liquidsoap" | ||
ENV LIQUIBASE_TELNET "1" | ||
|
||
ENV LIQUIDSOAP_SCRIPT "/opt/docker/etc/liquidsoap/default.liq" | ||
ENV LIQUIDSOAP_TEMPLATE "/opt/docker/etc/liquidsoap/default.liq" | ||
|
||
ENV LIQUIBASE_STREAM_INPUT "http://icecast:8000/live" | ||
|
||
ENV LIQUIBASE_PLAYLIST_DEFAULT "audio_to_stereo(single('/opt/docker/etc/liquidsoap/default.mp3'))" | ||
|
||
ENV LIQUIBASE_PLAYLIST_DAY "playlist('/opt/docker/etc/liquidsoap/playlist-day.pls')" | ||
ENV LIQUIBASE_PLAYLIST_DAY_TIMERANGE "4h-2h" | ||
|
||
ENV LIQUIBASE_PLAYLIST_NIGHT "playlist('/opt/docker/etc/liquidsoap/playlist-night.pls')" | ||
ENV LIQUIBASE_PLAYLIST_NIGHT_TIMERANGE "2h-14h" | ||
|
||
ENV LIQUIBASE_OUTPUT "output.icecast(%mp3(bitrate=128),host='localhost',port=8000,password='secretpassword',mount='liquidsoap-128',name=META_name,genre=META_genre,url=META_url,description=META_desc,ALL_input)" | ||
|
||
ENV LIQUIBASE_META_NAME "Liquidsoap Docker" | ||
ENV LIQUIBASE_META_GENRE "" | ||
ENV LIQUIBASE_META_URL "" | ||
ENV LIQUIBASE_META_DESCRIPTION "" | ||
|
||
COPY conf/ /opt/docker/ | ||
|
||
CMD ["liquidsoap"] | ||
|
||
EXPOSE 1234 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{{ docker.from("base","latest") }} | ||
|
||
# Install services | ||
RUN /usr/local/bin/apt-install \ | ||
liquidsoap \ | ||
liquidsoap-plugin-all \ | ||
mplayer \ | ||
gstreamer0.10-plugins-base \ | ||
gstreamer0.10-plugins-good \ | ||
{{ docker.cleanup() }} | ||
|
||
ENV LIQUIDSOAP_USER "liquidsoap" | ||
ENV LIQUIBASE_TELNET "1" | ||
|
||
ENV LIQUIDSOAP_SCRIPT "/opt/docker/etc/liquidsoap/default.liq" | ||
ENV LIQUIDSOAP_TEMPLATE "/opt/docker/etc/liquidsoap/default.liq" | ||
|
||
ENV LIQUIBASE_STREAM_INPUT "http://icecast:8000/live" | ||
|
||
ENV LIQUIBASE_PLAYLIST_DEFAULT "audio_to_stereo(single('/opt/docker/etc/liquidsoap/default.mp3'))" | ||
|
||
ENV LIQUIBASE_PLAYLIST_DAY "playlist('/opt/docker/etc/liquidsoap/playlist-day.pls')" | ||
ENV LIQUIBASE_PLAYLIST_DAY_TIMERANGE "4h-2h" | ||
|
||
ENV LIQUIBASE_PLAYLIST_NIGHT "playlist('/opt/docker/etc/liquidsoap/playlist-night.pls')" | ||
ENV LIQUIBASE_PLAYLIST_NIGHT_TIMERANGE "2h-14h" | ||
|
||
ENV LIQUIBASE_OUTPUT "output.icecast(%mp3(bitrate=128),host='localhost',port=8000,password='secretpassword',mount='liquidsoap-128',name=META_name,genre=META_genre,url=META_url,description=META_desc,ALL_input)" | ||
|
||
ENV LIQUIBASE_META_NAME "Liquidsoap Docker" | ||
ENV LIQUIBASE_META_GENRE "" | ||
ENV LIQUIBASE_META_URL "" | ||
ENV LIQUIBASE_META_DESCRIPTION "" | ||
|
||
{{ docker.copy('conf/', '/opt/docker/') }} | ||
|
||
{{ docker.cmd("liquidsoap") }} | ||
|
||
{{ docker.expose('1234') }} |
11 changes: 11 additions & 0 deletions
11
docker/liquidsoap/latest/conf/bin/entrypoint.d/liquidsoap.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env bash | ||
|
||
############################################# | ||
## Configure and run liquibase | ||
############################################# | ||
|
||
if [[ -n "$LIQUIDSOAP_TEMPLATE" ]]; then | ||
go-replace --mode=template -s Foobar -r Foobar -- "$LIQUIDSOAP_TEMPLATE" | ||
fi | ||
|
||
exec gosu "$LIQUIDSOAP_USER" liquidsoap "$LIQUIDSOAP_SCRIPT" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
#!/usr/bin/liquidsoap | ||
|
||
# Lines starting with # are comments, they are ignored. | ||
|
||
# Log path | ||
set("log.file.path","/dev/null") | ||
|
||
# Print log messages to the console, | ||
# can also be done by passing the -v option to liquidsoap. | ||
set("log.stdout", true) | ||
|
||
# Use the telnet server for requests | ||
{{if .Env.LIQUIBASE_TELNET}} | ||
set("server.telnet", true) | ||
{{end}} | ||
|
||
################## | ||
# Settings | ||
################## | ||
|
||
DJ_stream = "{{.Env.LIQUIBASE_STREAM_INPUT}}" | ||
|
||
PLAYLIST_default = {{.Env.LIQUIBASE_PLAYLIST_DEFAULT}} | ||
PLAYLIST_day = {{.Env.LIQUIBASE_PLAYLIST_DAY}} | ||
PLAYLIST_night = {{.Env.LIQUIBASE_PLAYLIST_NIGHT}} | ||
|
||
META_name = "{{.Env.LIQUIBASE_META_NAME}}" | ||
META_genre = "{{.Env.LIQUIBASE_META_GENRE}}" | ||
META_url = "{{.Env.LIQUIBASE_META_URL}}" | ||
META_desc = "{{.Env.LIQUIBASE_META_DESCRIPTION}}" | ||
|
||
## fetch dj stream | ||
DJ_input = input.http(DJ_stream) | ||
|
||
## fadeout dj | ||
#DJ_input = fade.out(merge_tracks(DJ_input)) | ||
|
||
# Play user requests if there are any, | ||
# otherwise one of our playlists, | ||
# and the default file if anything goes wrong. | ||
PLAYLIST_input = fallback([ | ||
switch([({ {{.Env.LIQUIBASE_PLAYLIST_DAY_TIMERANGE}} }, PLAYLIST_day), | ||
({ {{.Env.LIQUIBASE_PLAYLIST_NIGHT_TIMERANGE}} }, PLAYLIST_night)]), | ||
PLAYLIST_default | ||
]) | ||
|
||
## add fade | ||
PLAYLIST_input = smart_crossfade(fade_out=0.5, fade_in=0.5, PLAYLIST_input) | ||
|
||
## set title | ||
PLAYLIST_input = rewrite_metadata( | ||
[ | ||
("title", "$(title)"), | ||
("comment", "{{.Env.LIQUIBASE_META_URL}}") | ||
], | ||
PLAYLIST_input | ||
) | ||
|
||
# Add the ability to relay live shows | ||
ALL_input = fallback(track_sensitive=false, [DJ_input, PLAYLIST_input]) | ||
|
||
################# | ||
# Output | ||
################# | ||
|
||
{{.Env.LIQUIBASE_OUTPUT}} | ||
{{.Env.LIQUIBASE_OUTPUT_1}} | ||
{{.Env.LIQUIBASE_OUTPUT_2}} | ||
{{.Env.LIQUIBASE_OUTPUT_3}} | ||
{{.Env.LIQUIBASE_OUTPUT_4}} | ||
{{.Env.LIQUIBASE_OUTPUT_5}} | ||
{{.Env.LIQUIBASE_OUTPUT_6}} | ||
{{.Env.LIQUIBASE_OUTPUT_7}} | ||
{{.Env.LIQUIBASE_OUTPUT_8}} | ||
{{.Env.LIQUIBASE_OUTPUT_9}} | ||
{{.Env.LIQUIBASE_OUTPUT_10}} | ||
{{.Env.LIQUIBASE_OUTPUT_11}} | ||
{{.Env.LIQUIBASE_OUTPUT_12}} | ||
{{.Env.LIQUIBASE_OUTPUT_13}} | ||
{{.Env.LIQUIBASE_OUTPUT_14}} | ||
{{.Env.LIQUIBASE_OUTPUT_15}} | ||
{{.Env.LIQUIBASE_OUTPUT_16}} | ||
{{.Env.LIQUIBASE_OUTPUT_17}} | ||
{{.Env.LIQUIBASE_OUTPUT_18}} | ||
{{.Env.LIQUIBASE_OUTPUT_19}} | ||
{{.Env.LIQUIBASE_OUTPUT_20}} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#EXTM3U |
1 change: 1 addition & 0 deletions
1
docker/liquidsoap/latest/conf/etc/liquidsoap/playlist-night.pls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#EXTM3U |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{% import 'Dockerfile/docker.jinja2' as docker %} | ||
{% import 'Dockerfile/provision.jinja2' as provision %} | ||
|
||
{% macro ubuntu(role='') -%} | ||
# Install services | ||
RUN /usr/local/bin/apt-install \ | ||
liquidsoap \ | ||
{{ docker.cleanup() }} | ||
{%- endmacro %} | ||
libasound2-plugins alsa-utils libcamomile-ocaml-dev file libsox-fmt-all | ||
festival icecast2 liguidsoap liquidsoap-plugin-samplerate | ||
liquidsoap-plugin-xmlplaylist mplayer perl-doc libterm-readline-gnu-perl | ||
| libterm-readline-perl-perl make | ||
Recommended packages: | ||
liquidsoap-plugin-faad liquidsoap-plugin-flac liquidsoap-plugin-icecast | ||
liquidsoap-plugin-lame liquidsoap-plugin-mad liquidsoap-plugin-pulseaudio | ||
liquidsoap-plugin-taglib liquidsoap-plugin-voaacenc liquidsoap-plugin-vorbis | ||
logrotate mp3gain vorbis-tools vorbisgain netbase rename |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters