Skip to content

Commit

Permalink
Merge pull request #40 from mozilla/webrtc-support
Browse files Browse the repository at this point in the history
WebRTC support
  • Loading branch information
keianhzo authored May 3, 2024
2 parents 39dbfbe + db81406 commit c2cd2a8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
7 changes: 6 additions & 1 deletion bin/down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#!/bin/bash
basedir=$(dirname "$0")/..
mutagen-compose -f "$basedir"/docker-compose.yml down
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
IP_ADDR=$(ifconfig -l | xargs -n1 ipconfig getifaddr)
elif [[ "$OSTYPE" == "darwin"* ]]; then
IP_ADDR=$(ip route get 1 | awk '{print $NF;exit}')
fi
PRIVATE_NETWORK_IP=${ADDR} mutagen-compose -f "$basedir"/docker-compose.yml down
8 changes: 7 additions & 1 deletion bin/up
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,10 @@ mutagen daemon start
echo -e ${prefix}The mutagen daemon will stay running until you stop it manually with \`mutagen daemon stop\`.$suffix

echo -e ${prefix}Running mutagen-compose...$suffix
mutagen-compose -f "$basedir"/docker-compose.yml up --build --detach

if [[ "$OSTYPE" == "linux-gnu"* ]]; then
IP_ADDR=$(ifconfig -l | xargs -n1 ipconfig getifaddr)
elif [[ "$OSTYPE" == "darwin"* ]]; then
IP_ADDR=$(ip route get 1 | awk '{print $NF;exit}')
fi
PRIVATE_NETWORK_IP=${ADDR} mutagen-compose -f "$basedir"/docker-compose.yml up --build --detach
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ services:
user: postgres
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "5432:5432"
dialog:
build:
context: .
Expand All @@ -18,8 +20,16 @@ services:
HTTPS_CERT_FULLCHAIN: /etc/ssl/fullchain.pem
HTTPS_CERT_PRIVKEY: /etc/ssl/privkey.pem
INTERACTIVE: "false"
MEDIASOUP_MIN_PORT: 40000
MEDIASOUP_MAX_PORT: 40050
MEDIASOUP_ANNOUNCED_IP: ${PRIVATE_NETWORK_IP}
ports:
- "4443:4443"
# This should be the same as MEDIASOUP_MIN_PORT and MEDIASOUP_MAX_PORT
# You might neeed to increase this number depending on how many clients you are connecting.
# (Keep the ports range small to improve container startup time)
- "40000-40050:40000-40050"
- "40000-40050:40000-40050/udp"
volumes:
- dialog:/code
working_dir: /code
Expand Down

0 comments on commit c2cd2a8

Please sign in to comment.