bbb3.0: add webrtc-recorder

This commit is contained in:
chandi 2024-01-07 23:54:28 +01:00
parent a3f346d8a0
commit cdfe3a87c1
3 changed files with 90 additions and 0 deletions

View File

@ -482,12 +482,28 @@ services:
- ./data/bigbluebutton:/var/bigbluebutton
- ./data/freeswitch-meetings:/var/freeswitch/meetings
- ./data/mediasoup:/var/mediasoup
- ./data/bbb-webrtc-recorder:/var/lib/bbb-webrtc-recorder
tmpfs:
- /var/log/bigbluebutton
- /tmp
networks:
bbb-net:
ipv4_address: 10.7.7.16
bbb-webrtc-recorder:
build:
context: mod/bbb-webrtc-recorder
additional_contexts:
- src=./repos/bbb-webrtc-recorder
image: alangecker/bbb-docker-webrtc-recorder:{{ .Env.TAG_WEBRTC_RECORDER }}
depends_on:
- redis
volumes:
- ./mod/bbb-webrtc-recorder/bbb-webrtc-recorder.yml:/etc/bbb-webrtc-recorder/bbb-webrtc-recorder.yml
- ./data/bbb-webrtc-recorder:/var/lib/bbb-webrtc-recorder
networks:
bbb-net:
ipv4_address: 10.7.7.19
{{end}}
{{ if isTrue .Env.ENABLE_WEBHOOKS }}

View File

@ -0,0 +1,35 @@
# Build stage
FROM golang:1.19 as builder
ARG APP_VERSION=devel
ARG GOMOD=github.com/bigbluebutton/bbb-webrtc-recorder
WORKDIR /app
COPY --from=src go.* ./
RUN go mod tidy
COPY --from=src . ./
RUN go build -o ./build/bbb-webrtc-recorder \
-buildvcs=false \
-ldflags="-X '${GOMOD}/internal.AppVersion=${APP_VERSION}'" \
./cmd/bbb-webrtc-recorder
RUN mv /app/build/bbb-webrtc-recorder /usr/bin/bbb-webrtc-recorder
RUN rm -rf /app
# Running stage
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y gosu
# Copy the binary to the production image from the builder stage.
COPY --from=builder /usr/bin/bbb-webrtc-recorder /usr/bin/bbb-webrtc-recorder
# use same UID as in the recordings container
RUN groupadd -g 998 bigbluebutton && useradd -m -u 998 -g bigbluebutton bigbluebutton
CMD ["/bin/sh", "-c", "chown -R bigbluebutton:bigbluebutton /var/lib/bbb-webrtc-recorder && gosu bigbluebutton /usr/bin/bbb-webrtc-recorder"]

View File

@ -0,0 +1,39 @@
debug: false
recorder:
directory: /var/lib/bbb-webrtc-recorder
dirFileMode: 0700
fileMode: 0600
pubsub:
channels:
subscribe: to-bbb-webrtc-recorder
publish: from-bbb-webrtc-recorder
adapter: redis
adapters:
redis:
address: redis:6379
network: tcp
#password: foobared
webrtc:
rtcMinPort: 24577
rtcMaxPort: 32768
jitterBuffer: 512
iceServers:
- urls: []
# Example turn server
# - urls:
# - turn:turnserver.example.org:1234
# username: webrtc
# credential: turnpassword
# HTTP server for testing
# (should be disabled in production)
http:
port: 8080
enable: false
prometheus:
enable: false
listenAddress: 127.0.0.1:3200