2021-02-11 15:33:49 +01:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
cd $(dirname $0)/..
|
|
|
|
|
|
|
|
# load .env
|
2023-12-06 13:18:58 +01:00
|
|
|
. scripts/functions.sh
|
|
|
|
load_env
|
2021-02-11 15:33:49 +01:00
|
|
|
|
|
|
|
# check for non-optional environment variables,
|
|
|
|
# which got introduced later and may miss in existing
|
|
|
|
# .env files during upgrades
|
|
|
|
if [ -z "$EXTERNAL_IPv4" ]; then
|
|
|
|
echo "ERROR: EXTERNAL_IPv4 is not set in .env"
|
|
|
|
echo "BBB won't work without it."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2021-06-01 17:51:55 +02:00
|
|
|
if [ "$ENABLE_COTURN" == true ]; then
|
2021-06-08 18:28:24 +02:00
|
|
|
if [ -z "$ENABLE_HTTPS_PROXY" ] && [ -z "$COTURN_TLS_CERT_PATH" ]; then
|
|
|
|
echo "ERROR: coturn requires TLS certificates."
|
|
|
|
echo "Either enable the https proxy for certificate retrival"
|
|
|
|
echo "or provide a path to your certificates in .env file."
|
2021-06-01 17:51:55 +02:00
|
|
|
exit 1
|
|
|
|
fi
|
2021-06-08 18:28:24 +02:00
|
|
|
if [ -z "$ENABLE_HTTPS_PROXY" ] && [ "$DEV_MODE" == true ]; then
|
2021-06-01 17:51:55 +02:00
|
|
|
echo "ERROR: the https proxy can't get a certificate if ran locally and therefor coturn will never start"
|
|
|
|
echo "you should disable coturn in .env"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2023-11-29 22:17:49 +01:00
|
|
|
function get_tag {
|
2023-12-06 13:18:58 +01:00
|
|
|
# is submodule checked out?
|
|
|
|
if [ -f "$1/.git" ]; then
|
|
|
|
git --git-dir=$1/.git describe --tags --always
|
|
|
|
else
|
|
|
|
# get cached tag name from repos/tags
|
|
|
|
grep "$1" repos/tags | awk '{print $2}'
|
|
|
|
fi
|
2023-11-29 22:17:49 +01:00
|
|
|
}
|
2022-04-03 23:18:15 +02:00
|
|
|
|
2021-02-11 15:33:49 +01:00
|
|
|
docker run \
|
|
|
|
--rm \
|
|
|
|
-v $(pwd)/docker-compose.tmpl.yml:/docker-compose.tmpl.yml \
|
2023-11-29 22:17:49 +01:00
|
|
|
-e TAG_BBB=$(get_tag repos/bigbluebutton) \
|
|
|
|
-e TAG_FREESWITCH=$(get_tag repos/freeswitch) \
|
|
|
|
-e TAG_WEBRTC_SFU=$(get_tag repos/bbb-webrtc-sfu) \
|
|
|
|
-e TAG_WEBHOOKS=$(get_tag repos/bbb-webhooks) \
|
|
|
|
-e TAG_PLAYBACK=$(get_tag repos/bbb-playback) \
|
|
|
|
-e TAG_PADS=$(get_tag repos/bbb-pads) \
|
|
|
|
-e COMMIT_ETHERPAD_SKIN=$(get_tag repos/bbb-etherpad-skin) \
|
|
|
|
-e COMMIT_ETHERPAD_PLUGIN=$(get_tag repos/bbb-etherpad-plugin) \
|
2021-02-11 15:33:49 +01:00
|
|
|
-e DEV_MODE=${DEV_MODE:-false} \
|
2023-12-07 19:16:47 +01:00
|
|
|
-e DEV_HTML5=${DEV_HTML5:-false} \
|
2022-05-04 01:10:11 +02:00
|
|
|
-e EXTERNAL_IPv6=${EXTERNAL_IPv6:-} \
|
2021-02-11 15:33:49 +01:00
|
|
|
-e ENABLE_RECORDING=${ENABLE_RECORDING:-false} \
|
|
|
|
-e ENABLE_HTTPS_PROXY=${ENABLE_HTTPS_PROXY:-false} \
|
|
|
|
-e ENABLE_WEBHOOKS=${ENABLE_WEBHOOKS:-false} \
|
2021-06-01 17:51:55 +02:00
|
|
|
-e ENABLE_COTURN=${ENABLE_COTURN:-false} \
|
2021-02-11 15:33:49 +01:00
|
|
|
-e ENABLE_GREENLIGHT=${ENABLE_GREENLIGHT:-false} \
|
|
|
|
-e ENABLE_PROMETHEUS_EXPORTER=${ENABLE_PROMETHEUS_EXPORTER:-false} \
|
2021-10-17 00:01:07 +02:00
|
|
|
-e ENABLE_PROMETHEUS_EXPORTER_OPTIMIZATION=${ENABLE_PROMETHEUS_EXPORTER_OPTIMIZATION:-false} \
|
2021-02-24 21:50:27 +01:00
|
|
|
-e NUMBER_OF_BACKEND_NODEJS_PROCESSES=${NUMBER_OF_BACKEND_NODEJS_PROCESSES:-1} \
|
|
|
|
-e NUMBER_OF_FRONTEND_NODEJS_PROCESSES=${NUMBER_OF_FRONTEND_NODEJS_PROCESSES:-1} \
|
2021-02-11 15:33:49 +01:00
|
|
|
jwilder/dockerize -template /docker-compose.tmpl.yml \
|
2021-05-19 20:39:59 +02:00
|
|
|
> docker-compose.yml
|