Commit 99b466b2 authored by hark's avatar hark

Squashed commit of the following:

commit e7f4d773
Author: hark <hark@puscii.nl>
Date:   Sat Apr 18 01:55:13 2020 +0200

    museek

commit 724d1304
Author: hark <hark@puscii.nl>
Date:   Thu Apr 16 23:05:27 2020 +0200

    bla

commit 979f1193
Author: hark <hark@puscii.nl>
Date:   Thu Apr 16 20:10:30 2020 +0200

    mime

commit 6a583034
Author: hark <hark@puscii.nl>
Date:   Thu Apr 16 19:59:51 2020 +0200

    bla

commit 1f2b48fc
Author: hark <hark@puscii.nl>
Date:   Thu Apr 16 19:57:54 2020 +0200

    play

commit abac1ad4
Author: hark <hark@puscii.nl>
Date:   Thu Apr 16 19:38:34 2020 +0200

    bla

commit 56f729b6
Author: hark <hark@puscii.nl>
Date:   Thu Apr 16 19:03:24 2020 +0200

    bla

commit a008b10e
Author: hark <hark@puscii.nl>
Date:   Thu Apr 16 18:58:10 2020 +0200

    bla

commit eec1a2ff
Author: hark <hark@puscii.nl>
Date:   Thu Apr 16 18:53:27 2020 +0200

    bla

commit 7bddb79d
Author: hark <hark@puscii.nl>
Date:   Thu Apr 16 18:52:05 2020 +0200

    bla

commit 341d1ebe
Merge: a5eff306 5b34e1a8
Author: hark <hark@puscii.nl>
Date:   Thu Apr 16 18:51:59 2020 +0200

    Merge branch 'extended-simplify' of 185.52.224.4:sms/streaming-docker into extended-simplify

commit a5eff306
Author: hark <hark@puscii.nl>
Date:   Thu Apr 16 18:51:44 2020 +0200

    bla

commit 5b34e1a8
Author: root <root@fresh>
Date:   Thu Apr 16 18:46:11 2020 +0200

    la

commit 404c5f3d
Author: hark <hark@puscii.nl>
Date:   Thu Apr 16 18:44:57 2020 +0200

    bla

commit a8f3e8d6
Author: hark <hark@puscii.nl>
Date:   Thu Apr 16 18:42:29 2020 +0200

    bla

commit 1ee0d5be
Author: hark <hark@puscii.nl>
Date:   Thu Apr 16 18:34:04 2020 +0200

    bla

commit 7eef610c
Author: hark <hark@puscii.nl>
Date:   Thu Apr 16 18:31:16 2020 +0200

    bla

commit 9cfb3ebd
Author: hark <hark@puscii.nl>
Date:   Thu Apr 16 18:27:23 2020 +0200

    bla

commit 85695227
Author: hark <hark@puscii.nl>
Date:   Thu Apr 16 18:26:10 2020 +0200

    la

commit 5c799848
Author: hark <hark@puscii.nl>
Date:   Thu Apr 16 18:09:36 2020 +0200

    bla

commit c845b44d
Author: hark <hark@puscii.nl>
Date:   Thu Apr 16 18:01:40 2020 +0200

    bla

commit 5f07e3d0
Author: hark <hark@puscii.nl>
Date:   Thu Apr 16 18:00:26 2020 +0200

    bla

commit c0c214dc
Author: hark <hark@puscii.nl>
Date:   Thu Apr 16 17:58:03 2020 +0200

    bla

commit 07762bcf
Author: hark <hark@puscii.nl>
Date:   Thu Apr 16 17:12:47 2020 +0200

    la

commit b4fcb244
Author: hark <hark@puscii.nl>
Date:   Thu Apr 16 17:03:14 2020 +0200

    la

commit 6e23a75d
Author: hark <hark@puscii.nl>
Date:   Thu Apr 16 16:46:46 2020 +0200

    la

commit c3ad143f
Author: hark <hark@puscii.nl>
Date:   Thu Apr 16 16:00:50 2020 +0200

    la

commit 9db4c049
Author: hark <hark@puscii.nl>
Date:   Thu Apr 16 15:55:46 2020 +0200

    la

commit 421c0f82
Author: hark <hark@puscii.nl>
Date:   Thu Apr 16 15:52:55 2020 +0200

    cache

commit 868f3641
Author: hark <hark@puscii.nl>
Date:   Fri Apr 10 18:41:23 2020 +0200

    vnc

commit 2c9af7b9
Author: hark <hark@puscii.nl>
Date:   Fri Apr 10 18:33:17 2020 +0200

    lala

commit bdaddb1e
Author: hark <hark@puscii.nl>
Date:   Fri Apr 10 00:44:04 2020 +0200

    longer playlist

commit 0a81c1eb
Author: hark <hark@puscii.nl>
Date:   Wed Apr 8 17:57:59 2020 +0200

    buster

commit 6905a65e
Author: hark <hark@puscii.nl>
Date:   Tue Apr 7 03:04:11 2020 +0200

    la

commit db1240d7
Author: hark <hark@puscii.nl>
Date:   Tue Apr 7 02:59:36 2020 +0200

    la

commit 02c7bad2
Author: hark <hark@puscii.nl>
Date:   Tue Apr 7 02:58:39 2020 +0200

    la

commit 2c1ac7b7
Author: hark <hark@puscii.nl>
Date:   Tue Apr 7 02:57:24 2020 +0200

    la

commit 029ebe90
Author: hark <hark@puscii.nl>
Date:   Tue Apr 7 02:56:07 2020 +0200

    la

commit a00a4605
Author: hark <hark@puscii.nl>
Date:   Tue Apr 7 02:50:37 2020 +0200

    la

commit 2361f541
Author: hark <hark@puscii.nl>
Date:   Tue Apr 7 02:47:13 2020 +0200

    la

commit 06e5e918
Author: hark <hark@puscii.nl>
Date:   Tue Apr 7 02:43:35 2020 +0200

    lala

commit 7e79105b
Author: root <root@fresh>
Date:   Tue Apr 7 02:35:33 2020 +0200

    la

commit c415fa00
Author: root <root@fresh>
Date:   Tue Apr 7 02:34:47 2020 +0200

    lalal

commit a60e5f50
Author: hark <hark@puscii.nl>
Date:   Tue Apr 7 02:16:51 2020 +0200

    la

commit 0083208e
Author: hark <hark@puscii.nl>
Date:   Tue Apr 7 02:12:59 2020 +0200

    la

commit 96007c7c
Author: hark <hark@puscii.nl>
Date:   Tue Apr 7 02:12:04 2020 +0200

    la

commit e3b1e210
Author: hark <hark@puscii.nl>
Date:   Tue Apr 7 02:11:00 2020 +0200

    la

commit 1af43ad1
Author: hark <hark@puscii.nl>
Date:   Tue Apr 7 02:09:53 2020 +0200

    la

commit cde3c722
Author: hark <hark@puscii.nl>
Date:   Tue Apr 7 02:02:54 2020 +0200

    test

commit 4049c8cd
Author: hark <hark@puscii.nl>
Date:   Tue Apr 7 01:54:04 2020 +0200

    m

commit 6cf04aed
Author: root <root@fresh>
Date:   Tue Apr 7 01:34:17 2020 +0200

    br

commit 592be280
Author: root <root@fresh>
Date:   Tue Apr 7 01:13:55 2020 +0200

    lalala

commit 878cee35
Author: root <root@fresh>
Date:   Tue Apr 7 01:13:15 2020 +0200

    dirindex

commit b38afcfb
Author: root <root@fresh>
Date:   Tue Apr 7 00:49:20 2020 +0200

    no crash

commit fe7802e3
Author: root <root@fresh>
Date:   Tue Apr 7 00:00:29 2020 +0200

    brave config

commit 7e1afd93
Author: root <root@fresh>
Date:   Mon Apr 6 21:28:22 2020 +0200

    docs

commit 6846f12a
Author: root <root@fresh>
Date:   Mon Apr 6 21:21:33 2020 +0200

    remove old

commit 699fcc2c
Author: root <root@fresh>
Date:   Mon Apr 6 21:20:43 2020 +0200

    move brav submodule path, docker didnt like it

commit 24b92b6a
Author: root <root@fresh>
Date:   Mon Apr 6 21:14:43 2020 +0200

    fix nginx build

commit 5430a8ae
Author: hark <hark@puscii.nl>
Date:   Mon Apr 6 21:11:09 2020 +0200

    submod

commit 59435b60
Author: hark <hark@puscii.nl>
Date:   Mon Apr 6 21:04:09 2020 +0200

    submod

commit 2cbb872e
Author: root <root@fresh>
Date:   Mon Apr 6 20:05:50 2020 +0200

    disliq

commit 763592b3
Author: root <root@fresh>
Date:   Mon Apr 6 20:04:33 2020 +0200

    disliq

commit ee2071f9
Author: root <root@fresh>
Date:   Mon Apr 6 20:02:29 2020 +0200

    add testscript

commit 1843f7c6
Author: root <root@fresh>
Date:   Sun Apr 5 02:45:31 2020 +0200

    up video

commit b91b4845
Author: hark <hark@puscii.nl>
Date:   Sun Apr 5 02:17:17 2020 +0200

    brave

commit f1c2df77
Author: hark <hark@puscii.nl>
Date:   Sun Apr 5 02:14:06 2020 +0200

    brave

commit 2c7dd2ba
Author: hark <hark@puscii.nl>
Date:   Sun Apr 5 02:02:21 2020 +0200

    brave

commit 6b1ef766
Author: hark <hark@puscii.nl>
Date:   Sun Apr 5 01:58:13 2020 +0200

    brave

commit 916712e2
Author: hark <hark@puscii.nl>
Date:   Sun Apr 5 01:56:37 2020 +0200

    brave

commit d89b3404
Author: hark <hark@puscii.nl>
Date:   Sun Apr 5 01:51:50 2020 +0200

    brave

commit 4d5b275e
Author: hark <hark@puscii.nl>
Date:   Sun Apr 5 01:40:08 2020 +0200

    nginx

commit 893fafc7
Author: hark <hark@puscii.nl>
Date:   Sun Apr 5 01:37:13 2020 +0200

    nginx

commit c450757d
Author: hark <hark@puscii.nl>
Date:   Sun Apr 5 01:29:26 2020 +0200

    brave

commit 82c84acc
Author: hark <hark@puscii.nl>
Date:   Sun Apr 5 01:20:13 2020 +0200

    brave

commit bdada9d7
Author: hark <hark@puscii.nl>
Date:   Sun Apr 5 01:17:24 2020 +0200

    brave

commit 2a6a2c72
Author: hark <hark@puscii.nl>
Date:   Sun Apr 5 01:05:16 2020 +0200

    websocket

commit fdd66279
Author: hark <hark@puscii.nl>
Date:   Sun Apr 5 00:57:58 2020 +0200

    ws

commit 8885248f
Author: hark <hark@puscii.nl>
Date:   Sun Apr 5 00:53:26 2020 +0200

    websocket

commit 894bc928
Author: hark <hark@puscii.nl>
Date:   Sun Apr 5 00:47:09 2020 +0200

    websocket

commit d4dcfd86
Author: hark <hark@puscii.nl>
Date:   Sun Apr 5 00:39:54 2020 +0200

    websocket

commit dba76ade
Merge: fc54b5d8 3b406c69
Author: hark <hark@puscii.nl>
Date:   Sat Apr 4 23:08:30 2020 +0200

    Merge branch 'extended-simplify' of 185.52.224.4:sms/streaming-docker into extended-simplify

commit fc54b5d8
Author: hark <hark@puscii.nl>
Date:   Sat Apr 4 23:08:14 2020 +0200

    hushpipe

commit 3b406c69
Author: root <root@fresh>
Date:   Sat Apr 4 22:32:02 2020 +0200

    file

commit 162d94be
Author: hark <hark@puscii.nl>
Date:   Sat Apr 4 22:29:01 2020 +0200

    net

commit 77bc161b
Author: hark <hark@puscii.nl>
Date:   Sat Apr 4 22:23:02 2020 +0200

    more stuff

commit 698d11d6
Author: root <root@fresh>
Date:   Sat Apr 4 22:17:21 2020 +0200

    conf

commit 444a55c1
Author: root <root@fresh>
Date:   Sat Apr 4 22:15:56 2020 +0200

    don't rebuild on restart

commit cb58c6db
Author: root <root@fresh>
Date:   Sat Apr 4 22:08:17 2020 +0200

    fix

commit 90552b80
Author: root <root@fresh>
Date:   Sat Apr 4 21:34:55 2020 +0200

    nginx

commit 0037b381
Author: root <root@fresh>
Date:   Sat Apr 4 21:25:27 2020 +0200

    port

commit 8caf1768
Author: root <root@fresh>
Date:   Sat Apr 4 17:13:58 2020 +0200

    working envsubst

commit cc2581d3
Author: root <root@fresh>
Date:   Sat Apr 4 17:02:02 2020 +0200

    error checking

commit ffadbc4b
Author: root <root@fresh>
Date:   Sat Apr 4 16:43:47 2020 +0200

    fix init-letsencrypt (stupid docker bind mounts)

commit b2154b0c
Author: root <root@fresh>
Date:   Sat Apr 4 16:34:37 2020 +0200

    make sure ngin-config exist

commit 669035fd
Author: root <root@fresh>
Date:   Wed Apr 1 18:20:48 2020 +0200

    envsubst mess

commit b63618af
Author: hark <hark@puscii.nl>
Date:   Wed Apr 1 17:49:51 2020 +0200

    old docker version

commit b048e639
Author: hark <hark@puscii.nl>
Date:   Wed Apr 1 17:46:38 2020 +0200

    fix envsubst, cause it does indeed fuck up the nginx config

commit a535a921
Author: hark <hark@puscii.nl>
Date:   Wed Apr 1 17:12:31 2020 +0200

    shit

commit 544075bf
Author: root <root@fresh>
Date:   Tue Mar 31 17:08:43 2020 +0200

    fix

commit 78ae0448
Author: root <root@fresh>
Date:   Tue Mar 31 17:02:51 2020 +0200

    test

commit 73994a9d
Author: hark <hark@puscii.nl>
Date:   Tue Mar 31 16:55:51 2020 +0200

    ci

commit 8cc6816d
Author: hark <hark@puscii.nl>
Date:   Tue Mar 31 16:54:58 2020 +0200

    player / teststream

commit 57e76cfe
Author: root <root@fresh>
Date:   Tue Mar 31 16:15:24 2020 +0200

    defaults

commit 0c6d37e7
Author: hark <hark@puscii.nl>
Date:   Tue Mar 31 15:36:40 2020 +0200

    cache

commit 67e9dd07
Author: hark <hark@puscii.nl>
Date:   Mon Mar 16 23:29:00 2020 +0100

    remove some stuff

commit e8993905
Author: hark <hark@puscii.nl>
Date:   Mon Mar 16 23:23:44 2020 +0100

    simplify the setup and keep old behavior

commit f95c7cad
Author: root <root@fresh>
Date:   Mon Mar 16 22:07:41 2020 +0100

    seems to work now

commit 0260861f
Author: hark <hark@puscii.nl>
Date:   Mon Mar 16 18:11:30 2020 +0100

    configuration in /etc/default/sms, untested
parent 21d1823f
*.swp
*.swo
data/
nginx-ssl/data/
---
image: gcr.io/kaniko-project/executor:debug
variables:
builddir: "/builds/p2pcollab/mirage-skeleton/applications/static_website_tls"
cdir: "applications/static_website_tls"
binname: "https"
tarname: "$binname_$CI_COMMIT_REF_NAME_$CI_COMMIT_SHA.tar.gz"
stages:
- build
default:
tags:
- lag
cache:
key: "$CI_COMMIT_REF_SLUG"
paths:
- /kaniko
artifacts:
name: "all_$CI_JOB_NAME"
paths:
- ./
build:liquidsoap:
stage: build
tags:
- lag
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR/leftover --dockerfile $CI_PROJECT_DIR/leftover/liquidsoap.dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
[submodule "video"]
path = video
url = git@github.com:whohoho/video.git
[submodule "leftover/brave"]
path = leftover/brave
url = git@185.52.224.4:sms/brave.git
[submodule "streaming-media-stuff"]
path = streaming-media-stuff
url = https://git.puscii.nl/sms/streaming-media-stuff.git
[submodule "museek-docker"]
path = museek-docker
url = https://github.com/ultimate-pms/museek-docker.git
# streaming-docker
New stuff in this branch:
## brave
to develop locally:
get started:
````
git checkout this repo
git submodule init
git submodule update
cd leftover/brave
git pull origin dev (or other branch)
```
test your changes
```
cd leftover
docker-compose build brave
docker-compose build nginx-rtmp
docker-compose up
```
for changes in webif (leftover/brave_html) or config (leftover/brave_config), you don't need to rebuild, restart is enough
----
sort-of minimal setup with nginx-rtmp + liquidsoap, and ssl proxy with nginx
# To use:
# To create a production setup
- clone this repo in /root/sources/
- create the file /etc/default/sms
it should contain:
SD_ENV_FILE=/etc/default/sms
SD_REPO_PATH=/root/sources/streaming-docker
SD_RELAY_SERVER=rtmp://user:pass@intergalactic.tv/show
SD_HOST_HLS_ORIGIN='hls.laglab.org'
SD_INT_HLS_URL='http://dock.lag:8080'
- run ```./init-letsencrypt.sh``` once
- Modify service files to include needed variables.
- copy the service files to /etc/systemd/system/
- ```systemctl daemon-reload && systemctl restart nginx-ssl.service && systemctl restart leftover.service```
# Test with:
# Test it without using systemd
go to the leftover directory
create a file with environment variables:
SD_RELAY_SERVER=rtmp://user:pass@intergalactic.tv/show
SD_HOST_HLS_ORIGIN='hls.laglab.org'
SD_INT_HLS_URL='http://dock.lag:8080'
and set SD_ENV_FILE=/path/to/file
then run: docker-compose up --build
# defaults file
- settings are created in /etc/default/sms
- if you do not use the systemd service files but run compose directly, you have to specify the path to this file as an environment varialbe (SD_ENV_FILE)
- it should contain all the site specific config (hostnames, paths etc.)
- the systemd units source it, so the variables are accessible to them, also they will be available inside the containers, inside the containers you can use envsubst to template configuration files
docker-compose up --build
#!/usr/bin/env bash
#FIXME: https://docs.docker.com/engine/security/userns-remap/
set -eux
cd /root/sources/streaming-docker
GITDIR="`git rev-parse --show-toplevel`"
if [[ "$GITDIR" == "" ]]
then
echo "not in the git repo, exiting"
exit 11
fi
source /etc/default/sms
if [[ "$SD_TEST" == "true" ]]
then
CONT="yes"
else
echo "Don't use this script if you haven't committed / added your changes, it will fuck up the git repo \n type yes to continue"
read CONT
fi
if [[ "$CONT" == "yes" ]]
then
echo "continueing"
else
exit 10
fi
install_services () {
echo "installing and restarting services"
if [[ "${SD_LE_INIT}" == "true" ]]
then
$GITDIR/nginx-ssl/init-letsencrypt.sh
fi
docker ps
systemctl stop nginx-ssl.service
systemctl stop leftover.service
systemctl stop hushpipe.service
cp "$GITDIR/sd-sed.sh" /usr/local/bin/
chmod +x /usr/local/bin/sd-sed.sh
#rm /etc/systemd/system/leftover.service
#rm /etc/systemd/system/nginx-ssl.service
#rm /etc/systemd/system/hushpipe.service
cp "$GITDIR/leftover/leftover.service" /etc/systemd/system/
cp "$GITDIR/nginx-ssl/nginx-ssl.service" /etc/systemd/system/
cp "$GITDIR/video/hushpipe.service" /etc/systemd/system/
systemctl daemon-reload
sleep 5
echo "normally containers should be down now"
docker ps
systemctl restart leftover.service
systemctl restart hushpipe.service
#FIXME: nginx-ssl should get some dependencies on the others
systemctl restart nginx-ssl.service
sleep 5
docker ps
systemctl status nginx-ssl.service
systemctl status leftover.service
systemctl status hushpipe.service
docker ps
}
if test -f /etc/default/sms
then
systemctl stop nginx-ssl.service && true
systemctl stop leftover.service && true
systemctl stop hushpipe.service && true
docker ps
systemctl start docker
systemctl start containerd
echo "already installed, pulling git ,reinstalling services + sedscript"
. /etc/default/sms
git clean -dfi
git pull
git checkout ${SD_STREAMING_DOCKER_BRANCH}
git pull
git submodule init
git submodule update
git submodule foreach git pull origin master
install_services
exit 0
else
echo "streaming docker not installed, installing"
# cp "$GITDIR/../defaults" /etc/default/sms
. /etc/default/sms
cd "$GITDIR"
git checkout ${SD_STREAMING_DOCKER_BRANCH}
#install docker
apt update
apt install -y apt-transport-https ca-certificates curl software-properties-common gnupg2
apt-key add "$GITDIR/docker.asc"
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
apt update
apt-get install -y docker-ce docker-compose
if docker network create sdnet
then
printf "created docker network"
fi
mkdir -p "${SD_MNT_RADIO}"
mkdir -p "${SD_MNT_RADIO}/recordings/rtmprec/inputrec"
chmod a+rwx "${SD_MNT_RADIO}/recordings/rtmprec/inputrec"
mkdir -p "${SD_MNT_RADIO}/recordings/rtmprec/streams"
chmod a+rwx "${SD_MNT_RADIO}/recordings/rtmprec/streams"
install_services
fi
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFit2ioBEADhWpZ8/wvZ6hUTiXOwQHXMAlaFHcPH9hAtr4F1y2+OYdbtMuth
lqqwp028AqyY+PRfVMtSYMbjuQuu5byyKR01BbqYhuS3jtqQmljZ/bJvXqnmiVX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v8RZeDzFiG8HdCtg9RvIt/AIFoHR
H3S+U79NT6i0KPzLImDfs8T7RlpyuMc4Ufs8ggyg9v3Ae6cN3eQyxcK3w0cbBwsh
/nQNfsA6uu+9H7NhbehBMhYnpNZyrHzCmzyXkauwRAqoCbGCNykTRwsur9gS41TQ
M8ssD1jFheOJf3hODnkKU+HKjvMROl1DK7zdmLdNzA1cvtZH/nCC9KPj1z8QC47S
xx+dTZSx4ONAhwbS/LN3PoKtn8LPjY9NP9uDWI+TWYquS2U+KHDrBDlsgozDbs/O
jCxcpDzNmXpWQHEtHU7649OXHP7UeNST1mCUCH5qdank0V1iejF6/CfTFU4MfcrG
YT90qFF93M3v01BbxP+EIY2/9tiIPbrd
=0YYh
-----END PGP PUBLIC KEY BLOCK-----
datadir/*
nginx.conf
liquidsoap:
env_file:
- ${SD_ENV_FILE:-.empty}
build:
context: .
dockerfile: liquidsoap.dockerfile
restart: unless-stopped
ports:
- 8051:8051
- 9051:9051
volumes:
- /mnt/radio:/mnt/radio
version: '3'
version: '3.3'
volumes:
radiodata:
services:
nginx-rtmp:
# image: alfg/nginx-rtmp:latest
image: 9313fe22d925
build:
context: .
dockerfile: nginx-rtmp.dockerfile
env_file:
- ${SD_ENV_FILE:-.empty}
restart: unless-stopped
ports:
- 1935:1935
- 8080:80
- 6581:80
environment:
- HTTP_PORT=80
- RTMP_PORT=1935
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- /mnt/radio:/mnt/radio
- type: "bind"
source: "/mnt/radio"
target: "/mnt/radio"
- ./nginx.conf:/etc/nginx/nginx.conf:ro
#- type: "bind"
#source: "./nginx.conf"
#target: "/etc/nginx/nginx.conf"
#mode: "ro"
- type: "bind"
source: "./player"
target: "/var/www/player"
#mode: "ro"
liquidsoap:
build:
context: .
dockerfile: liquidsoap.dockerfile
test1:
command: /testscripts/test1.sh
build:
context: .
dockerfile: nginx-rtmp.dockerfile
env_file:
- ${SD_ENV_FILE:-.empty}
#image: alfg/nginx-rtmp:latest
restart: unless-stopped
ports:
- 8051:8051
- 9051:9051
volumes:
- /mnt/radio:/mnt/radio
- ./testscripts:/testscripts
networks:
default:
external:
name: sdnet
......@@ -6,19 +6,15 @@ After=docker.service
[Service]
Restart=always
## Modify these lines ##
WorkingDirectory=<fill-in-the-path-to-the-repo-here>
Environment=LEFTOVER_STREAMER='<fill-in-the-path-to-the-repo-here>'
Environment=IFM_SERVER='<fill-in-the-ifm-streaming-key-and-server-here>'
## Modify these lines ##
WorkingDirectory=/tmp
ExecStartPre=/bin/bash -c "sed 's/IFM_SERVER/${IFM_SERVER}/g' ${LEFTOVER_STREAMER}/nginx.conf.template > ${LEFTOVER_STREAMER}/nginx.conf"
EnvironmentFile=/etc/default/sms
# Compose up
ExecStart=/usr/bin/docker-compose up --build
ExecStartPre=/bin/bash -c "cat ${LEFTOVER_STREAMER}/leftover/nginx.conf.template | /usr/local/bin/sd-sed.sh > ${LEFTOVER_STREAMER}/leftover/nginx.conf"
ExecStart=/bin/bash -c " cd ${SD_REPO_PATH}; /usr/bin/docker-compose -f ${SD_REPO_PATH}/leftover/docker-compose.yml up"
ExecStop=/bin/bash -c " cd ${SD_REPO_PATH}; /usr/bin/docker-compose -f ${SD_REPO_PATH}/leftover/docker-compose.yml down"
# Compose down, remove containers
ExecStop=/usr/bin/docker-compose down
[Install]
WantedBy=multi-user.target
types {
text/html html htm shtml;
text/css css;
text/xml xml;
image/gif gif;
image/jpeg jpeg jpg;
application/javascript js;
application/atom+xml atom;
application/rss+xml rss;
text/mathml mml;
text/plain txt;
text/vnd.sun.j2me.app-descriptor jad;
text/vnd.wap.wml wml;
text/x-component htc;
image/png png;
image/svg+xml svg svgz;
image/tiff tif tiff;
image/vnd.wap.wbmp wbmp;
image/webp webp;
image/x-icon ico;
image/x-jng jng;
image/x-ms-bmp bmp;
font/woff woff;
font/woff2 woff2;
application/java-archive jar war ear;
application/json json;
application/mac-binhex40 hqx;
application/msword doc;
application/pdf pdf;
application/postscript ps eps ai;
application/rtf rtf;
application/vnd.apple.mpegurl m3u8;
application/vnd.google-earth.kml+xml kml;
application/vnd.google-earth.kmz kmz;
application/vnd.ms-excel xls;
application/vnd.ms-fontobject eot;
application/vnd.ms-powerpoint ppt;
application/vnd.oasis.opendocument.graphics odg;
application/vnd.oasis.opendocument.presentation odp;
application/vnd.oasis.opendocument.spreadsheet ods;
application/vnd.oasis.opendocument.text odt;
application/vnd.openxmlformats-officedocument.presentationml.presentation
pptx;
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
xlsx;
application/vnd.openxmlformats-officedocument.wordprocessingml.document
docx;
application/vnd.wap.wmlc wmlc;
application/x-7z-compressed 7z;
application/x-cocoa cco;
application/x-java-archive-diff jardiff;
application/x-java-jnlp-file jnlp;
application/x-makeself run;
application/x-perl pl pm;
application/x-pilot prc pdb;
application/x-rar-compressed rar;
application/x-redhat-package-manager rpm;
application/x-sea sea;
application/x-shockwave-flash swf;
application/x-stuffit sit;
application/x-tcl tcl tk;
application/x-x509-ca-cert der pem crt;
application/x-xpinstall xpi;
application/xhtml+xml xhtml;
application/xspf+xml xspf;
application/zip zip;
application/octet-stream bin exe dll;
application/octet-stream deb;
application/octet-stream dmg;
application/octet-stream iso img;
application/octet-stream msi msp msm;
audio/midi mid midi kar;
audio/mpeg mp3;
audio/ogg ogg;
audio/x-m4a m4a;
audio/x-realaudio ra;
video/3gpp 3gpp 3gp;
video/mp2t ts;
video/mp4 mp4;
video/mpeg mpeg mpg;
video/quicktime mov;
video/webm webm;
video/x-flv flv;
video/x-m4v m4v;
video/x-mng mng;
video/x-ms-asf asx asf;
video/x-ms-wmv wmv;
video/x-msvideo avi;
}
ARG NGINX_VERSION=1.16.1
ARG NGINX_RTMP_VERSION=1.2.1
ARG FFMPEG_VERSION=4.2.2
##############################
# Build the NGINX-build image.
FROM alpine:3.11 as build-nginx
ARG NGINX_VERSION
ARG NGINX_RTMP_VERSION
# Build dependencies.
RUN apk add --update \
build-base \
ca-certificates \
curl \
gcc \
libc-dev \
libgcc \
linux-headers \
make \
musl-dev \
openssl \
openssl-dev \
pcre \
pcre-dev \
pkgconf \
pkgconfig \
zlib-dev
# Get nginx source.
RUN cd /tmp && \
wget https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz && \
tar zxf nginx-${NGINX_VERSION}.tar.gz && \
rm nginx-${NGINX_VERSION}.tar.gz
# Get nginx-rtmp module.
RUN cd /tmp && \
wget https://github.com/arut/nginx-rtmp-module/archive/v${NGINX_RTMP_VERSION}.tar.gz && \
tar zxf v${NGINX_RTMP_VERSION}.tar.gz && rm v${NGINX_RTMP_VERSION}.tar.gz
# Compile nginx with nginx-rtmp module.
RUN cd /tmp/nginx-${NGINX_VERSION} && \
./configure \
--prefix=/usr/local/nginx \
--add-module=/tmp/nginx-rtmp-module-${NGINX_RTMP_VERSION} \
--conf-path=/etc/nginx/nginx.conf \
--with-threads \
--with-file-aio \
--with-http_ssl_module \
--with-debug \
--with-cc-opt="-Wimplicit-fallthrough=0" && \
cd /tmp/nginx-${NGINX_VERSION} && make && make install
###############################
# Build the FFmpeg-build image.
FROM alpine:3.11 as build-ffmpeg
ARG FFMPEG_VERSION
ARG PREFIX=/usr/local
ARG MAKEFLAGS="-j4"
# FFmpeg build dependencies.
RUN apk add --update \
build-base \
coreutils \
freetype-dev \
lame-dev \
libogg-dev \