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.* 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"] 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),