Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebRTC support #40

Merged
merged 4 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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