Skip to content

Commit

Permalink
Make RTP port range configurable, use bind mount while building.
Browse files Browse the repository at this point in the history
  • Loading branch information
sobomax committed Jul 26, 2024
1 parent d4680c2 commit 4ce8165
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ USER root
ENV DEBIAN_FRONTEND=noninteractive

WORKDIR /tmp
COPY docker/build.sh docker/b2bua/requirements.txt /tmp

# Build & install everything
RUN ./build.sh
RUN --mount=type=bind,source=docker/build.sh,target=build.sh \
--mount=type=bind,source=docker/b2bua/requirements.txt,target=requirements.txt \
./build.sh

ENV WRP_ROOT="/webrtc_phone"
WORKDIR ${WRP_ROOT}
Expand All @@ -28,8 +29,11 @@ USER nobody
ENV HTTPS_PORT=4430
ENV WSS_PORT=9876

ENV MIN_RTP_PORT=32000
ENV MAX_RTP_PORT=34000

EXPOSE ${HTTPS_PORT}
EXPOSE ${WSS_PORT}
EXPOSE 32000-34000/udp
EXPOSE ${MIN_RTP_PORT}-${MAX_RTP_PORT}/udp

ENTRYPOINT [ "./run.sh" ]
4 changes: 2 additions & 2 deletions docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ KFILE="${WRP_ROOT}/server.key"
WROOT="${WRP_ROOT}/SIP.js/demo"
HTTPS_PORT="${HTTPS_PORT:-"443"}"
WSS_PORT="${WSS_PORT:-"9876"}"
MIN_RTP_PORT=32000
MAX_RTP_PORT=34000
MIN_RTP_PORT="${MIN_RTP_PORT:-"32000"}"
MAX_RTP_PORT="${MAX_RTP_PORT:-"34000"}"

RSOCK="/tmp/rtpproxy.sock"
RMODDIR="/usr/local/lib/rtpproxy"
Expand Down

0 comments on commit 4ce8165

Please sign in to comment.