Commit 3d619662 authored by Christian Pointner's avatar Christian Pointner
Browse files

some hacky scripts to run engine inside docker

parent 99498fb4
Pipeline #452 passed with stage
in 1 minute and 9 seconds
FROM python:3.6.9-stretch
MAINTAINER Gottfried Gaisbauer <gottfried.gaisbauer@servus.at>
RUN set -ex \
&& rm -f /usr/bin/python && ln -s /usr/local/bin/python /usr/bin/python \
&& rm -f /usr/bin/python3 && ln -s /usr/local/bin/python3 /usr/bin/python3
RUN set -ex \
&& apt-get update -q \
&& apt-get install -y -q --no-install-recommends libev4 libev-dev \
liquidsoap liquidsoap-plugin-alsa liquidsoap-plugin-icecast liquidsoap-plugin-jack liquidsoap-plugin-pulseaudio \
liquidsoap-plugin-flac liquidsoap-plugin-lame liquidsoap-plugin-mad liquidsoap-plugin-ogg liquidsoap-plugin-opus liquidsoap-plugin-faad \
liquidsoap-plugin-taglib \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY requirements.txt /tmp/requirements.txt
RUN pip3 install -r /tmp/requirements.txt
RUN set -ex \
&& adduser --home /srv --no-create-home --system --uid 1000 --group app \
&& adduser app audio
#!/usr/bin/python3.5
#!/usr/bin/python3
#
# engine
......
#!/bin/bash
exec sudo docker build -t aura/engine .
......@@ -6,10 +6,10 @@
db_user="engine"
db_name="engine"
db_pass="engine"
db_host="localhost"
db_host="172.17.0.1"
[redis]
redis_host="localhost"
redis_host="172.17.0.1"
redis_port=6379
redis_db=0
......@@ -38,9 +38,9 @@ mailsubject_prefix="[AURA]"
[dataurls]
# the url of pv/steering
calendarurl="http://localhost:8000/api/v1/playout"
calendarurl="http://172.17.0.1:8000/api/v1/playout"
# the url of tank
importerurl="http://localhost:8008/api/v1/groups/_public/playlists/"
importerurl="http://172.17.0.1:8040/api/v1/shows/_public/playlists/"
# how often should the calendar be fetched in seconds (This determines the time of the last change before a specific show)
fetching_frequency=3600
......@@ -57,11 +57,6 @@ fade_out_time="2.5"
# all these settings from here to the bottom require a restart of the liquidsoap server
[user]
# the user and group under which this software will run
daemongroup="gg"
daemonuser="gg"
[socket]
socketdir="/home/gg/PycharmProjects/engine/modules/liquidsoap"
......@@ -83,7 +78,7 @@ fallback_threshold="-50."
# if you are starving for pain in the ass choose alsa
# if you don't care about latency choose pulseaudio
# if you want low latency and a bit of experimenting, choose jack
soundsystem="jack"
soundsystem="alsa"
# you can define up to 5 inputs and outputs
# it is tested with
......
#!/usr/bin/python3.5
#!/usr/bin/python3
#
# engine
......
#!/bin/bash
BASE_D=$(realpath "${BASH_SOURCE%/*}/")
exec sudo docker run --rm -it -u $UID:$GID -v "$BASE_D":/srv -v "$BASE_D/configuration/":/etc/aura --tmpfs /var/log/aura/ aura/engine /srv/initdb.py
#!/bin/bash
BASE_D=$(realpath "${BASH_SOURCE%/*}/")
exec sudo docker run --name aura-engine --rm -it -u $UID:$GID -p 127.0.0.1:8050:5000 -v "$BASE_D":/srv -v "$BASE_D/configuration/":/etc/aura --tmpfs /var/log/aura/ aura/engine /srv/aura.py
#!/bin/bash
BASE_D=$(realpath "${BASH_SOURCE%/*}/")
exec sudo docker run --name aura-engine-liquidsoap --rm -it -u 1000:1000 -v "$BASE_D":/srv -v "$BASE_D/configuration/":/etc/aura --tmpfs /var/log/aura/ --device /dev/snd aura/engine /bin/bash -c "cd /srv/modules/liquidsoap && liquidsoap --debug --verbose engine.liq"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment