diff --git a/.env.sample b/.env.sample index 1037f0c..8f9e640 100644 --- a/.env.sample +++ b/.env.sample @@ -40,6 +40,9 @@ BRF_CONF_VERSION=v1 BHDN_CONF_VERSION=v1 BEG_CONF_VERSION=v1 AA_CONF_VERSION=v1 +PRES_CONF_VERSION=v1 +DEMO_CONF_VERSION=v1 +FREESWITCH_EX_VERSION=v1 # ==================================== # ADDITIONS to BigBlueButton @@ -97,7 +100,7 @@ ENABLE_GREENLIGHT=true # CONNECTION # ==================================== -EXTERNAL_IPv4= +EXTERNAL_IPv4=0.0.0.0 # EXTERNAL_IPv6=2010 # STUN SERVER @@ -113,7 +116,7 @@ STUN_PORT=3478 # due to high traffic caused by bots, by default the SIP port is blocked. # but you can allow access by your providers IP or IP ranges (comma seperated) # Hint: if you want to allow requests from every IP, you can use 0.0.0.0/0 -SIP_IP_ALLOWLIST= +SIP_IP_ALLOWLIST=0.0.0.0/0 # ==================================== # CUSTOMIZATION @@ -130,7 +133,7 @@ WELCOME_FOOTER="This server is running /dev/tcp/$PGHOST/5432) 2>/dev/null; do +# i=$((i+1)) +# if [ $i -ge $TIMEOUT ]; then +# echo "Postgres did not start within $TIMEOUT seconds." +# exit 1 +# fi +# sleep 1 +# done +# echo "Postgres is ready!" + +cd /app/ + +# patch database url +# TODO: this should be possible upstream in BBB via an environment variable +yq e -i ".[1].configuration.connection_info.database_url = \"$HASURA_GRAPHQL_BBB_DATABASE_URL\"" metadata/databases/databases.yaml + +sed -i "s/^admin_secret: .*/admin_secret: $HASURA_GRAPHQL_ADMIN_SECRET/g" /app/config.yaml + +echo "SELECT 'CREATE DATABASE hasura_app' WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'hasura_app')\gexec" | psql + +echo "Restarting database bbb_graphql" +psql -c "SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity WHERE datname = 'bbb_graphql'" > /dev/null +psql -c "drop database if exists bbb_graphql with (force)" +psql -c "create database bbb_graphql WITH TEMPLATE template0 LC_COLLATE 'C.UTF-8'" +psql -c "alter database bbb_graphql set timezone to 'UTC'" + +echo "Creating tables in bbb_graphql" +psql -U postgres -d bbb_graphql -q -f bbb_schema.sql --set ON_ERROR_STOP=on + +echo "Starting hasura-graphql-engine" +gosu nobody graphql-engine serve --log-level debug & +PID=$! + +sleep 1 + + +#Check if Hasura is ready before applying metadata +while ! netstat -tuln | grep ":$HASURA_GRAPHQL_SERVER_PORT " > /dev/null; do + echo "Waiting for Hasura's port ($HASURA_GRAPHQL_SERVER_PORT) to be ready..." + sleep 1 +done + +echo "Applying new metadata to Hasura" +/usr/local/bin/hasura metadata apply --skip-update-check + +wait "$PID" + +#graphql-engine serve --log-level debug \ No newline at end of file diff --git a/entrypoint.bbb-web.sh b/entrypoint.bbb-web.sh index 37dab05..c223a16 100644 --- a/entrypoint.bbb-web.sh +++ b/entrypoint.bbb-web.sh @@ -53,4 +53,4 @@ sleep 100 cd /usr/share/bbb-web/ dockerize \ -template /etc/bigbluebutton/bbb-web.properties.tmpl:/etc/bigbluebutton/bbb-web.properties \ - gosu bigbluebutton java -Dgrails.env=prod -Dserver.address=0.0.0.0 -Dserver.port=8090 -Dspring.main.allow-circular-references=true -Xms384m -Xmx384m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/bigbluebutton/diagnostics -cp WEB-INF/lib/*:/:WEB-INF/classes/:. org.springframework.boot.loader.WarLauncher + gosu bigbluebutton java -Dgrails.env=prod -Dserver.address=0.0.0.0 -Dserver.port=8090 -Dspring.main.allow-circular-references=true -Xms384m -Xmx384m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/bigbluebutton/diagnostics -cp WEB-INF/lib/*:/:WEB-INF/classes/:. org.springframework.boot.loader.launch.WarLauncher diff --git a/entrypoint.freeswitch.sh b/entrypoint.freeswitch.sh index 939c639..72e9643 100644 --- a/entrypoint.freeswitch.sh +++ b/entrypoint.freeswitch.sh @@ -80,6 +80,13 @@ fi export SOUNDS_PATH=$SOUNDS_DIR/$(echo "$SOUNDS_LANGUAGE" | sed 's|-|/|g') +sed -i -e 's/10.7.7.10/0.0.0.0/g' /etc/freeswitch/vars.xml.tmpl +sed -i -e 's/:5066/0.0.0.0:5066/g' /etc/freeswitch/sip_profiles/external.xml +sed -i -e 's/:5066/0.0.0.0:5066/g' /etc/freeswitch/sip_profiles/external-ipv6.xml +sed -i -e 's/:5066/0.0.0.0:5066/g' /etc/freeswitch/sip_profiles/internal.xml + +sed -i -e 's/$${local_ip_v4}/auto-nat/g' /etc/freeswitch/sip_profiles/external.xml +#sed -i -e 's/$${local_ip_v4}/auto-nat/g' /etc/freeswitch/sip_profiles/external-ipv6.xml dockerize \ -template /etc/freeswitch/vars.xml.tmpl:/etc/freeswitch/vars.xml \ diff --git a/mod/bbb-apps-akka.conf b/mod/bbb-apps-akka.conf index ae21ad1..c451614 100644 --- a/mod/bbb-apps-akka.conf +++ b/mod/bbb-apps-akka.conf @@ -1,9 +1,7 @@ // include default config from upstream include "/bbb-apps-akka/conf/application.conf" -redis { - host="redis" -} +redis.host = "redis" services { bbbWebAPI="https://DOMAIN/bigbluebutton/api" diff --git a/mod/freeswitch/conf/sip_profiles/external.xml b/mod/freeswitch/conf/sip_profiles/external.xml index 53c9de1..6a21ffb 100644 --- a/mod/freeswitch/conf/sip_profiles/external.xml +++ b/mod/freeswitch/conf/sip_profiles/external.xml @@ -101,8 +101,8 @@ - - + + diff --git a/mod/freeswitch/conf/vars.xml.tmpl b/mod/freeswitch/conf/vars.xml.tmpl index b86502d..ec672c2 100644 --- a/mod/freeswitch/conf/vars.xml.tmpl +++ b/mod/freeswitch/conf/vars.xml.tmpl @@ -60,7 +60,7 @@ affect the sip authentication. Please review conf/directory/default.xml for more information on this topic. --> - + diff --git a/mod/nginx/bbb/demo.nginx b/mod/nginx/bbb/demo.nginx index 8b68775..5b9e3f7 100644 --- a/mod/nginx/bbb/demo.nginx +++ b/mod/nginx/bbb/demo.nginx @@ -3,24 +3,8 @@ location = /demo/ { return 301 /demo/demo1.jsp; } + # temporarily since the original used host networking location /demo { - proxy_pass http://host.docker.internal:8001; - proxy_redirect default; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - - # Allow 30M uploaded presentation document. - client_max_body_size 30m; - client_body_buffer_size 128k; - - proxy_connect_timeout 90; - proxy_send_timeout 90; - proxy_read_timeout 90; - - proxy_buffer_size 4k; - proxy_buffers 4 32k; - proxy_busy_buffers_size 64k; - proxy_temp_file_write_size 64k; - - include fastcgi_params; + return 404; } diff --git a/mod/webrtc-sfu-config.yaml b/mod/webrtc-sfu-config.yaml index 45c72da..b86f3dc 100644 --- a/mod/webrtc-sfu-config.yaml +++ b/mod/webrtc-sfu-config.yaml @@ -1,9 +1,11 @@ kurento: [] redisHost: redis -clientHost: webrtc-sfu + +clientHost: 0.0.0.0 # this changed + recordingAdapter: bbb-webrtc-recorder -mcs-host: webrtc-sfu +mcs-host: 0.0.0.0 # this changed mcs-address: webrtc-sfu freeswitch: ip: freeswitch @@ -29,7 +31,7 @@ mediasoup: # Must match the port range published in compose.yml (24577-24676) rtcMinPort: 24577 rtcMaxPort: 24676 - + disableLiburing: true plainRtp: listenIp: ip: "0.0.0.0"