diff --git a/docker/build.sh b/docker/build.sh index 39ccd77..ccedb98 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -3,14 +3,13 @@ set -x set -e -DEV_PKGS="libc6-dev gcc" +DEV_PKGS="libc6-dev gcc python3-pip" apt-get -y --no-install-recommends update -qq -apt-get -y --no-install-recommends install python-is-python3 python3-pip npm \ +apt-get -y --no-install-recommends install python-is-python3 nginx \ ${DEV_PKGS} python3 -m pip install --break-system-packages -U -r b2bua/requirements.txt -npm install http-server apt-get -y remove ${DEV_PKGS} apt-get -y autoremove diff --git a/docker/nginx.conf b/docker/nginx.conf new file mode 100644 index 0000000..095701b --- /dev/null +++ b/docker/nginx.conf @@ -0,0 +1,19 @@ +daemon off; + +events {} + +http { + server { + listen 443 ssl; + listen [::]:443 ssl; + server_name webrtc_phone.local; + + ssl_certificate /webrtc_phone/server.crt; + ssl_certificate_key /webrtc_phone/server.key; + + location / { + root /webrtc_phone/SIP.js/demo; + index index.html index.htm; + } + } +} diff --git a/docker/run.sh b/docker/run.sh index 4a69c21..74b8f14 100755 --- a/docker/run.sh +++ b/docker/run.sh @@ -9,7 +9,6 @@ RTPP_LOG_LEVEL="${RTPP_LOG_LEVEL:-"dbug"}" CFILE="/webrtc_phone/server.crt" KFILE="/webrtc_phone/server.key" WROOT="/webrtc_phone/SIP.js/demo" -PNUM=443 MIN_RTP_PORT=32000 MAX_RTP_PORT=34000 @@ -18,7 +17,7 @@ RMODDIR="/usr/local/lib/rtpproxy" BDIR="/webrtc_phone/b2bua" -npm exec -- http-server -S -C "${CFILE}" -K "${KFILE}" -p ${PNUM} "${WROOT}" & +nginx -c /webrtc_phone/nginx.conf & HSERV_PID="${!}" /usr/local/bin/rtpproxy_debug -f -F -s "${RSOCK}" \