mirror of
https://github.com/bigbluebutton/docker.git
synced 2024-12-24 15:49:13 +01:00
initial IPv6 support
This commit is contained in:
parent
ad6075b6ca
commit
060f08e68c
@ -4,7 +4,7 @@ services:
|
||||
image: instrumentisto/coturn:4.5
|
||||
restart: unless-stopped
|
||||
command:
|
||||
- "--external-ip=${EXTERNAL_IP}"
|
||||
- "--external-ip=${EXTERNAL_IPv4}"
|
||||
- "--static-auth-secret=${TURN_SECRET}"
|
||||
volumes:
|
||||
- ssl_data:/etc/resty-auto-ssl
|
||||
|
@ -31,7 +31,7 @@ services:
|
||||
- SYS_RESOURCE
|
||||
environment:
|
||||
DOMAIN: ${DOMAIN}
|
||||
EXTERNAL_IP: ${EXTERNAL_IP}
|
||||
EXTERNAL_IPv4: ${EXTERNAL_IPv4}
|
||||
SIP_IP_ALLOWLIST: ${SIP_IP_ALLOWLIST}
|
||||
NETWORK_INTERFACE: ${NETWORK_INTERFACE:-}
|
||||
volumes:
|
||||
@ -53,11 +53,13 @@ services:
|
||||
- ./mod/nginx/bbb:/etc/nginx/bbb
|
||||
- ./mod/nginx/bigbluebutton:/etc/nginx/conf.d/default.conf
|
||||
- ${DEFAULT_PRESENTATION:-/dev/null}:/etc/nginx/html/default.pdf
|
||||
networks:
|
||||
bbb-net:
|
||||
ipv4_address: 10.7.7.13
|
||||
network_mode: host
|
||||
extra_hosts:
|
||||
- "host.docker.internal:10.7.7.1"
|
||||
- "core:10.7.7.2"
|
||||
- "etherpad:10.7.7.4"
|
||||
- "webrtc-sfu:10.7.7.10"
|
||||
- "html5:10.7.7.11"
|
||||
|
||||
etherpad:
|
||||
build: mod/etherpad
|
||||
@ -94,7 +96,6 @@ services:
|
||||
KMS_STUN_PORT: ${STUN_PORT}
|
||||
KMS_MIN_PORT: 24577
|
||||
KMS_MAX_PORT: 32768
|
||||
KMS_EXTERNAL_ADDRESS: ${EXTERNAL_IP}
|
||||
KMS_TURN_URL:
|
||||
KMS_NETWORK_INTERFACES: ${NETWORK_INTERFACE:-}
|
||||
network_mode: host
|
||||
@ -113,10 +114,10 @@ services:
|
||||
KURENTO_NAME: kurento
|
||||
REDIS_HOST: redis
|
||||
FREESWITCH_IP: host.docker.internal
|
||||
FREESWITCH_SIP_IP: ${EXTERNAL_IP}
|
||||
FREESWITCH_SIP_IP: ${EXTERNAL_IPv4}
|
||||
ESL_IP: host.docker.internal
|
||||
LOG_LEVEL: info
|
||||
NODE_CONFIG: '{"kurento":[{"ip":"${EXTERNAL_IP}","url":"ws://kurento:8888/kurento"}]}'
|
||||
NODE_CONFIG: '{"kurento":[{"ip":"${EXTERNAL_IPv4}","url":"ws://kurento:8888/kurento"}]}'
|
||||
ports:
|
||||
- "127.0.0.1:3008:3008"
|
||||
extra_hosts:
|
||||
|
@ -1,4 +0,0 @@
|
||||
<!--
|
||||
IPv6 is disabled for now since there a some more configurations needed
|
||||
to make it work beautifully
|
||||
-->
|
@ -60,7 +60,7 @@
|
||||
-->
|
||||
<X-PRE-PROCESS cmd="set" data="local_ip_v4=10.7.7.1"/>
|
||||
<X-PRE-PROCESS cmd="set" data="local_ip_v6=::1"/>
|
||||
<X-PRE-PROCESS cmd="set" data="external_ip_v4={{ .Env.EXTERNAL_IP }}"/>
|
||||
<X-PRE-PROCESS cmd="set" data="external_ipv4_v4={{ .Env.EXTERNAL_IPv4 }}"/>
|
||||
<X-PRE-PROCESS cmd="set" data="domain={{ .Env.DOMAIN }}"/>
|
||||
<X-PRE-PROCESS cmd="set" data="domain_name=$${domain}"/>
|
||||
<X-PRE-PROCESS cmd="set" data="hold_music=local_stream://moh"/>
|
||||
@ -300,7 +300,7 @@
|
||||
If unspecified, the bind_server_ip value is used.
|
||||
Used by: sofia.conf.xml dingaling.conf.xml
|
||||
-->
|
||||
<X-PRE-PROCESS cmd="set" data="external_rtp_ip={{ .Env.EXTERNAL_IP }}"/>
|
||||
<X-PRE-PROCESS cmd="set" data="external_rtp_ip={{ .Env.EXTERNAL_IPv4 }}"/>
|
||||
|
||||
<!-- external_sip_ip
|
||||
Used as the public IP address for SDP.
|
||||
@ -313,7 +313,7 @@
|
||||
If unspecified, the bind_server_ip value is used.
|
||||
Used by: sofia.conf.xml dingaling.conf.xml
|
||||
-->
|
||||
<X-PRE-PROCESS cmd="set" data="external_sip_ip={{ .Env.EXTERNAL_IP }}"/>
|
||||
<X-PRE-PROCESS cmd="set" data="external_sip_ip={{ .Env.EXTERNAL_IPv4 }}"/>
|
||||
|
||||
<!-- unroll-loops
|
||||
Used to turn on sip loopback unrolling.
|
||||
|
@ -1,5 +1,5 @@
|
||||
location /ws {
|
||||
proxy_pass https://host.docker.internal:7443;
|
||||
proxy_pass https://$freeswitch_addr:7443;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
|
@ -1,7 +1,13 @@
|
||||
map $remote_addr $freeswitch_addr {
|
||||
"~:" [::1];
|
||||
default 127.0.0.1;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen 8080 default_server;
|
||||
listen [::]:8080 default_server;
|
||||
server_name _;
|
||||
access_log /var/log/nginx/bigbluebutton.access.log;
|
||||
access_log /dev/stdout;
|
||||
|
||||
# redirect to greenlight
|
||||
location = / {
|
||||
|
@ -32,9 +32,11 @@ RAILS_SECRET=cdfbae48b197805a435ab7881da31c642ac1a7d4d5c006441efa8125ae63865ce7c
|
||||
|
||||
DOMAIN=bbb.example.com
|
||||
|
||||
EXTERNAL_IP=144.76.97.10
|
||||
EXTERNAL_IPv4=144.76.97.10
|
||||
|
||||
# setting the network interface speeds up kurentos WebRTC connection time
|
||||
# setting the network interface speeds up kurentos WebRTC connection time,
|
||||
# but currently also disables IPv6 for Kurento
|
||||
# (https://github.com/Kurento/bugtracker/issues/500)
|
||||
#NETWORK_INTERFACE=ens3
|
||||
|
||||
# STUN SERVER
|
||||
|
@ -19,7 +19,7 @@ then
|
||||
fi
|
||||
|
||||
|
||||
EXTERNAL_IP=$(curl -s http://whatismyip.akamai.com)
|
||||
EXTERNAL_IPv4=$(curl -4 -s https://icanhazip.com)
|
||||
|
||||
greenlight=""
|
||||
while [[ ! $greenlight =~ ^(y|n)$ ]]; do
|
||||
@ -46,9 +46,17 @@ done
|
||||
|
||||
ip_correct=""
|
||||
while [[ ! $ip_correct =~ ^(y|n)$ ]]; do
|
||||
read -p "Is $EXTERNAL_IP your external IPv4 address? (y/n): " ip_correct
|
||||
read -p "Is $EXTERNAL_IPv4 your external IPv4 address? (y/n): " ip_correct
|
||||
done
|
||||
|
||||
if [ ! "$ip_correct" == "y" ]
|
||||
then
|
||||
EXTERNAL_IPv4=""
|
||||
while [[ ! $EXTERNAL_IPv4 =~ ^[1-9][0-9]{0,2}\.[1-9][0-9]{0,2}\.[1-9][0-9]{0,2}\.[1-9][0-9]{0,2}$ ]]; do
|
||||
read -p "Please enter correct IPv4 address: " EXTERNAL_IPv4
|
||||
done
|
||||
fi
|
||||
|
||||
if [ ! "$ip_correct" == "y" ]
|
||||
then
|
||||
EXTERNAL_IP=""
|
||||
@ -61,7 +69,7 @@ fi
|
||||
|
||||
# write settings
|
||||
cp sample.env .env
|
||||
sed -i "s/EXTERNAL_IP=.*/EXTERNAL_IP=$EXTERNAL_IP/" .env
|
||||
sed -i "s/EXTERNAL_IPv4=.*/EXTERNAL_IPv4=$EXTERNAL_IPv4/" .env
|
||||
sed -i "s/DOMAIN=.*/DOMAIN=$DOMAIN/" .env
|
||||
|
||||
if [ ! "$greenlight" == "y" ]
|
||||
@ -79,7 +87,7 @@ then
|
||||
sed -i "s/.*TURN_SERVER=.*/TURN_SERVER=turns:$DOMAIN:465?transport=tcp/" .env
|
||||
TURN_SECRET=$(head /dev/urandom | tr -dc A-Za-f0-9 | head -c 32)
|
||||
sed -i "s/.*TURN_SECRET=.*/TURN_SECRET=$TURN_SECRET/" .env
|
||||
sed -i "s/.*STUN_IP=.*/STUN_IP=$EXTERNAL_IP/" .env
|
||||
sed -i "s/.*STUN_IP=.*/STUN_IP=$EXTERNAL_IPv4/" .env
|
||||
else
|
||||
sed -i "s/ENABLE_COTURN.*/#ENABLE_COTURN=true/" .env
|
||||
fi
|
||||
|
@ -31,6 +31,7 @@ else
|
||||
# rebuild everything else only when modified
|
||||
./scripts/compose build --pull
|
||||
|
||||
sed -i 's/EXTERNAL_IP=/EXTERNAL_IPv4=/' .env
|
||||
|
||||
COMMIT_HASH=$(git rev-parse --short HEAD)
|
||||
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
|
||||
|
Loading…
Reference in New Issue
Block a user