From d51f729e1afcdb340c20c6fdf117e5ed97cf047a Mon Sep 17 00:00:00 2001 From: chandi Date: Thu, 11 Feb 2021 20:17:42 +0100 Subject: [PATCH] move bbb-webrtc-sfu submodule --- .gitmodules | 2 +- docker-compose.tmpl.yml | 4 +--- mod/webrtc-sfu/Dockerfile | 8 ++------ bbb-webrtc-sfu => mod/webrtc-sfu/bbb-webrtc-sfu | 0 mod/webrtc-sfu/docker-entrypoint.sh | 6 ++++++ 5 files changed, 10 insertions(+), 10 deletions(-) rename bbb-webrtc-sfu => mod/webrtc-sfu/bbb-webrtc-sfu (100%) create mode 100755 mod/webrtc-sfu/docker-entrypoint.sh diff --git a/.gitmodules b/.gitmodules index 8afffbd..f808c89 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,5 +1,5 @@ [submodule "bbb-webrtc-sfu"] - path = bbb-webrtc-sfu + path = mod/webrtc-sfu/bbb-webrtc-sfu url = https://github.com/bigbluebutton/bbb-webrtc-sfu.git [submodule "mod/etherpad/bbb-etherpad-skin"] path = mod/etherpad/bbb-etherpad-skin diff --git a/docker-compose.tmpl.yml b/docker-compose.tmpl.yml index de0b342..61bb07b 100644 --- a/docker-compose.tmpl.yml +++ b/docker-compose.tmpl.yml @@ -115,9 +115,7 @@ services: - vol-kurento:/var/kurento webrtc-sfu: - build: - context: ./bbb-webrtc-sfu - dockerfile: ../mod/webrtc-sfu/Dockerfile + build: mod/webrtc-sfu restart: unless-stopped depends_on: - redis diff --git a/mod/webrtc-sfu/Dockerfile b/mod/webrtc-sfu/Dockerfile index 94af0a2..d315afa 100644 --- a/mod/webrtc-sfu/Dockerfile +++ b/mod/webrtc-sfu/Dockerfile @@ -3,7 +3,7 @@ FROM node:14-alpine RUN apk add git \ && adduser -D -u 2004 -g webrtc-sfu webrtc-sfu -ADD . app +ADD ./bbb-webrtc-sfu app WORKDIR app @@ -19,11 +19,7 @@ RUN cp config/default.example.yml config/production.yml \ && npm install --unsafe-perm \ && npm cache clear --force - -# remove automatic IP detection (broken in alpine) -# and use sh instead of bash -RUN sed -i 's/CONTAINER_IP=.*/CONTAINER_IP=10.7.7.10/' /app/docker-entrypoint.sh \ - && sed -i 's/bash/sh/' /app/docker-entrypoint.sh +COPY docker-entrypoint.sh /app/docker-entrypoint.sh USER webrtc-sfu ENTRYPOINT [ "./docker-entrypoint.sh" ] diff --git a/bbb-webrtc-sfu b/mod/webrtc-sfu/bbb-webrtc-sfu similarity index 100% rename from bbb-webrtc-sfu rename to mod/webrtc-sfu/bbb-webrtc-sfu diff --git a/mod/webrtc-sfu/docker-entrypoint.sh b/mod/webrtc-sfu/docker-entrypoint.sh new file mode 100755 index 0000000..243593c --- /dev/null +++ b/mod/webrtc-sfu/docker-entrypoint.sh @@ -0,0 +1,6 @@ +#!/bin/sh -e + +sed -i "s|^\(localIpAddress\):.*|\1: \"10.7.7.10\"|g" config/production.yml +export KURENTO_IP="10.7.7.1" + +exec "$@"