diff --git a/docker-liquidsoap b/docker-liquidsoap deleted file mode 160000 index 73682cf..0000000 --- a/docker-liquidsoap +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 73682cfcb241d1e9cfa16b51a98e2cbc424d2cbb diff --git a/docker-liquidsoap/.travis.yml b/docker-liquidsoap/.travis.yml new file mode 100644 index 0000000..f577559 --- /dev/null +++ b/docker-liquidsoap/.travis.yml @@ -0,0 +1,5 @@ +install: + - curl -sLo - http://j.mp/install-travis-docker | sh -xe + +script: + - ./run 'docker build -t moul/liquidsoap . && docker run moul/liquidsoap echo Build succeed' diff --git a/docker-liquidsoap/Dockerfile b/docker-liquidsoap/Dockerfile new file mode 100644 index 0000000..36427b9 --- /dev/null +++ b/docker-liquidsoap/Dockerfile @@ -0,0 +1,20 @@ +FROM ocaml/opam:ubuntu + +MAINTAINER Daniel + +USER root + +RUN apt-get -q update && \ + apt-get install -qq -yy python festival sox && \ + apt-get clean + +RUN curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl && \ + chmod a+rx /usr/local/bin/youtube-dl + +USER opam + +RUN opam switch 4.05.0 && \ + opam depext cry faad ffmpeg flac gstreamer lame liquidsoap mad opus samplerate ssl taglib vorbis && \ + opam install cry faad ffmpeg flac gstreamer lame liquidsoap mad opus samplerate ssl taglib vorbis + +CMD ["liquidsoap", "-h"] diff --git a/docker-liquidsoap/LICENSE b/docker-liquidsoap/LICENSE new file mode 100644 index 0000000..914942a --- /dev/null +++ b/docker-liquidsoap/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 Manfred Touron + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/docker-liquidsoap/README.md b/docker-liquidsoap/README.md new file mode 100644 index 0000000..883df7a --- /dev/null +++ b/docker-liquidsoap/README.md @@ -0,0 +1,25 @@ +Liquidsoap in Docker +==================== + +Liquidsoap Dockerfile + +https://index.docker.io/u/moul/liquidsoap/ + +Run +--- + + docker run moul/liquidsoap -h + + docker run moul/liquidsoap 'output.dummy(blank())' + +Extends Dockerfile +------------------ + + FROM moul/liquidsoap + ADD ./config.liq /config/config.liq + CMD ["/config/config.liq"] + +Examples +-------- + +- https://github.com/ultreme/scc-radio/ diff --git a/docker-liquidsoap/supervisor.sh b/docker-liquidsoap/supervisor.sh new file mode 100755 index 0000000..7e7387f --- /dev/null +++ b/docker-liquidsoap/supervisor.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +echo $@ > /run.sh +supervisord -c /etc/supervisord.conf +sleep 1 +touch /tmp/harbor.log +tail -n 100 -f /tmp/*.log diff --git a/docker-liquidsoap/supervisord.conf b/docker-liquidsoap/supervisord.conf new file mode 100644 index 0000000..f999ed6 --- /dev/null +++ b/docker-liquidsoap/supervisord.conf @@ -0,0 +1,33 @@ +[unix_http_server] +file=/tmp/supervisor.sock + +[supervisord] +logfile=/tmp/supervisord.log +logfile_maxbytes=50MB +logfile_backups=10 +loglevel=warn +pidfile=/tmp/supervisord.pid +nodaemon=false +minfds=1024 +minprocs=200 +user=liquidsoap + +[rpcinterface:supervisor] +supervisor.rpcinterface_factory=supervisor.rpcinterface:make_main_rpcinterface + +[supervisorctl] +serverurl=unix:///tmp/supervisor.sock + +[program:liquidsoap] +user=liquidsoap +command=bash /run.sh +stopsignal=6 +#stdout_events_enabled=true +#stderr_events_enabled=true +autorestart=true + +#[eventlistener:stdout] +#command=supervisor_stdout +#buffer_size=100 +#events=PROCESS_LOG +#result_hander=supervisor_stdout:event_handler