Compare commits
2 commits
c2b56cc85d
...
bb8e4cdbfa
Author | SHA1 | Date | |
---|---|---|---|
bb8e4cdbfa | |||
628e4d3d55 |
4 changed files with 22 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -6,3 +6,4 @@ dist/
|
|||
rec/
|
||||
*.egg-info/
|
||||
/venv
|
||||
/docker/output/*
|
||||
|
|
10
Makefile
10
Makefile
|
@ -27,7 +27,7 @@ docker-build-techrec:
|
|||
techrec
|
||||
|
||||
docker-stop:
|
||||
$(DOCKERC) down
|
||||
$(DOCKERC) down -v
|
||||
|
||||
docker-run:
|
||||
$(DOCKERC) run --rm --service-ports techrec
|
||||
|
@ -43,6 +43,12 @@ docker-shell-liquidsoap:
|
|||
$(eval CONTAINER = $(shell docker ps|grep liquidsoap|awk '{print $$12}'))
|
||||
$(DOCKER) exec -ti $(CONTAINER) bash
|
||||
|
||||
docker-logs-storage:
|
||||
$(DOCKERC) logs -f storage
|
||||
|
||||
docker-logs-liquidsoap:
|
||||
$(DOCKERC) logs -f liquidsoap
|
||||
|
||||
local-install:
|
||||
$(PY) -m venv $(VENV)
|
||||
./$(VENV)/bin/pip install -e .
|
||||
|
@ -51,4 +57,4 @@ local-serve:
|
|||
env TECHREC_CONFIG=$(CONFIG) ./$(VENV)/bin/techrec -vv serve
|
||||
|
||||
|
||||
.PHONY: docker-build docker-build-liquidsoap docker-build-techrec docker-stop docker-run docker-shell-techrec docker-shell-storage docker-shell-liquidsoap local-install local-serve
|
||||
.PHONY: docker-build docker-build-liquidsoap docker-build-techrec docker-stop docker-run docker-shell-techrec docker-shell-storage docker-shell-liquidsoap docker-logs-storage docker-logs-liquidsoap local-install local-serve
|
||||
|
|
|
@ -7,11 +7,11 @@ services:
|
|||
dockerfile: docker/Dockerfile.liquidsoap
|
||||
volumes:
|
||||
- ./docker/run.liq:/run.liq
|
||||
- ./docker/ror.sh:/ror.sh
|
||||
- ./docker/run.sh:/run.sh
|
||||
- rec:/rec
|
||||
devices:
|
||||
- /dev/snd:/dev/snd
|
||||
entrypoint: /run.liq
|
||||
entrypoint: /run.sh
|
||||
depends_on:
|
||||
- storageprepare
|
||||
|
||||
|
|
11
docker/run.sh
Executable file
11
docker/run.sh
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -xueo pipefail
|
||||
|
||||
FILEPATH="/rec/ror/$(date +%Y-%m)/$(date +%d)/rec-$(date +%Y-%m-%d-%H)-00-00.mp3"
|
||||
mkdir -p $(dirname ${FILEPATH})
|
||||
if ! [[ -f ${FILEPATH} ]]; then
|
||||
ffmpeg -f lavfi -i anullsrc=r=11025:cl=mono -t 3600 -acodec mp3 ${FILEPATH}
|
||||
fi
|
||||
|
||||
/run.liq
|
Loading…
Reference in a new issue