From 828ea17db9ee910d75b5bdec7dec0260aa25b40b Mon Sep 17 00:00:00 2001 From: prlanzarin <4529051+prlanzarin@users.noreply.github.com> Date: Mon, 24 Apr 2023 13:02:44 -0300 Subject: [PATCH 1/3] chore: add VIM swap files, log files to gitignore --- .gitignore | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 8480e95..3bfffa2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ build -release/* \ No newline at end of file +release/* +*swn +*swo +*swp +*~ +*log.* From f0d6afaa172311cb3d5a736fa288e1c84701fc4f Mon Sep 17 00:00:00 2001 From: prlanzarin <4529051+prlanzarin@users.noreply.github.com> Date: Mon, 24 Apr 2023 13:16:34 -0300 Subject: [PATCH 2/3] chore: add /etc/bigbluebutton/ as prio config dir, remove hardcoded STUN --- internal/config/config.go | 3 --- internal/config/loader.go | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/internal/config/config.go b/internal/config/config.go index a7393a8..89716ac 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -48,9 +48,6 @@ func (cfg *Config) SetDefaults() { Network: "tcp", Password: "", } - cfg.WebRTC.ICEServers = append(cfg.WebRTC.ICEServers, webrtc.ICEServer{ - URLs: []string{"stun:stun.l.google.com:19302"}, - }) cfg.WebRTC.RTCMinPort = 24577 cfg.WebRTC.RTCMaxPort = 32768 cfg.WebRTC.JitterBuffer = 512 diff --git a/internal/config/loader.go b/internal/config/loader.go index c3b92fa..7e2d718 100644 --- a/internal/config/loader.go +++ b/internal/config/loader.go @@ -20,6 +20,7 @@ func (cfg *Config) Load(app App, configFile string) { Filename: configFile, Finder: gonfig.Finder{ BasePaths: []string{ + fmt.Sprintf("/etc/bigbluebutton/%s", app.Name), fmt.Sprintf("/etc/%s/%s", app.Name, app.Name), fmt.Sprintf("$HOME/.config/%s", app.Name), fmt.Sprintf("./%s", app.Name), From 25761b6551b983026593a3deda2376e26364a59d Mon Sep 17 00:00:00 2001 From: prlanzarin <4529051+prlanzarin@users.noreply.github.com> Date: Mon, 24 Apr 2023 13:27:24 -0300 Subject: [PATCH 3/3] build: add basic Dockerfile --- Dockerfile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..77e9ac9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM golang:1.19-alpine + +COPY . /app +WORKDIR /app + +ENV APP_VERSION $(cat ./VERSION) +ENV GOMOD $(go list -m) + +RUN go mod tidy +RUN go build -o ./build/bbb-webrtc-recorder ./cmd/bbb-webrtc-recorder + +RUN ls -ahlt ./* + +RUN mv /app/build/bbb-webrtc-recorder /usr/local/bin/bbb-webrtc-recorder + +WORKDIR /usr/local/bin + +RUN rm -rf /app + +EXPOSE 8080 + +RUN ls -ahlt +CMD ["./bbb-webrtc-recorder"]