Compare commits
2 commits
7ec0d6bfc8
...
59d84eafe2
Author | SHA1 | Date | |
---|---|---|---|
59d84eafe2 | |||
51fd340cd2 |
6 changed files with 14 additions and 6 deletions
|
@ -12,6 +12,7 @@ COPY . /src/techrec
|
|||
RUN groupadd -g ${hostgid} techrec \
|
||||
&& useradd -g techrec -u ${hostuid} -m techrec \
|
||||
&& mkdir -p /src/techrec \
|
||||
&& mkdir -p /src/db \
|
||||
&& chown -R techrec:techrec /src \
|
||||
&& apt-get -qq update \
|
||||
&& apt-get install -qq -y ffmpeg \
|
||||
|
@ -24,5 +25,8 @@ RUN python -m venv ./venv \
|
|||
&& ./venv/bin/python -m pip install wheel \
|
||||
&& ./venv/bin/python -m pip install -e ./techrec
|
||||
|
||||
VOLUME ["/src/db"]
|
||||
EXPOSE 8000
|
||||
|
||||
ENTRYPOINT ["/src/venv/bin/techrec"]
|
||||
CMD ["-vv", "serve"]
|
||||
|
|
|
@ -37,6 +37,7 @@ services:
|
|||
- .:/src/techrec
|
||||
- rec:/rec
|
||||
- ./docker/output:/src/output
|
||||
- db:/src/db
|
||||
ports:
|
||||
- 8000:8000
|
||||
depends_on:
|
||||
|
@ -45,3 +46,4 @@ services:
|
|||
|
||||
volumes:
|
||||
rec:
|
||||
db:
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
AUDIO_INPUT = "http://storage/ror"
|
||||
DB_URI = "sqlite:////src/db/techrec.db"
|
||||
AUDIO_INPUT = "http://storage"
|
||||
# decomment this if you want to test with local audio source
|
||||
# AUDIO_INPUT = "/rec/ror"
|
||||
# AUDIO_INPUT = "/rec"
|
||||
AUDIO_OUTPUT = "/src/output"
|
||||
DEBUG = True
|
||||
HOST = "0.0.0.0"
|
||||
|
|
|
@ -19,8 +19,8 @@ output.file(
|
|||
id="rorrec",
|
||||
reopen_when={0m},
|
||||
%mp3(bitrate=80, samplerate=44100, stereo=true,stereo_mode="joint_stereo"),
|
||||
"/rec/ror/%Y-%m/%d/rec-%Y-%m-%d-%H-%M-%S.mp3",
|
||||
"/rec/%Y-%m/%d/rec-%Y-%m-%d-%H-%M-%S.mp3",
|
||||
# %vorbis(quality=0.3, samplerate=44100, channels=2),
|
||||
# "/rec/ror/%Y-%m/%d/rec-%Y-%m-%d-%H-%M-%S.ogg",
|
||||
# "/rec/%Y-%m/%d/rec-%Y-%m-%d-%H-%M-%S.ogg",
|
||||
rorinput
|
||||
);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
set -xueo pipefail
|
||||
|
||||
FILEPATH="/rec/ror/$(date +%Y-%m)/$(date +%d)/rec-$(date +%Y-%m-%d-%H)-00-00.mp3"
|
||||
FILEPATH="/rec/$(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}
|
||||
|
|
|
@ -82,7 +82,8 @@ class RecDB:
|
|||
self.log = logging.getLogger(name=self.__class__.__name__)
|
||||
|
||||
logging.getLogger("sqlalchemy.engine").setLevel(logging.FATAL)
|
||||
logging.getLogger("sqlalchemy.engine.base.Engine").setLevel(logging.FATAL)
|
||||
logging.getLogger(
|
||||
"sqlalchemy.engine.base.Engine").setLevel(logging.FATAL)
|
||||
logging.getLogger("sqlalchemy.dialects").setLevel(logging.FATAL)
|
||||
logging.getLogger("sqlalchemy.pool").setLevel(logging.FATAL)
|
||||
logging.getLogger("sqlalchemy.orm").setLevel(logging.FATAL)
|
||||
|
|
Loading…
Reference in a new issue