This repository has been archived by the owner on Dec 14, 2021. It is now read-only.
forked from bigbluebutton/docker
-
Notifications
You must be signed in to change notification settings - Fork 33
/
compose
executable file
·64 lines (53 loc) · 1.81 KB
/
compose
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
set -e
cd $(dirname $0)/..
# load .env
if [ -f .env ]
then
# exclude WELCOME_MESSAGE && WELCOME_FOOTER because it may contain invalid characters
export $(cat .env | sed 's/#.*//g' | grep -v "WELCOME_FOOTER" | grep -v "WELCOME_MESSAGE" | xargs)
fi
# 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."
echo "this can happen if you did an manual upgrade without executing"
echo " ./scripts/upgrade"
echo "try to run it again"
exit 1
fi
# set conditional variables
export CERTIFICATE_DOMAINS=$DOMAIN
export GREENLIGHT_ENDPOINT=https://$DOMAIN/bigbluebutton/api/
if [ "$DEV_MODE" == true ]; then
export CERTIFICATE_DOMAINS="invalid"
export GREENLIGHT_ENDPOINT=http://10.7.7.1:8080/bigbluebutton/api/
fi
if [ ! -z "$EXTERNAL_IPv6" ]; then
export HTTPS_SITE_FILE="site.conf"
else
export HTTPS_SITE_FILE="site-ipv4only.conf"
fi
# concatenate docker-compose file
COMPOSE_FILES="-f docker-compose.yml"
if [ "$ENABLE_HTTPS_PROXY" == true ]; then
COMPOSE_FILES="$COMPOSE_FILES -f docker-compose.https.yml"
fi
if [ "$ENABLE_COTURN" == true ]; then
COMPOSE_FILES="$COMPOSE_FILES -f docker-compose.coturn.yml"
fi
if [ "$ENABLE_GREENLIGHT" == true ]; then
COMPOSE_FILES="$COMPOSE_FILES -f docker-compose.greenlight.yml"
fi
if [ "$ENABLE_WEBHOOKS" == true ]; then
COMPOSE_FILES="$COMPOSE_FILES -f docker-compose.webhooks.yml"
fi
if [ "$ENABLE_PROMETHEUS_EXPORTER" == true ]; then
COMPOSE_FILES="$COMPOSE_FILES -f docker-compose.prometheus.yml"
fi
if [ "$ENABLE_RECORDING" == true ]; then
COMPOSE_FILES="$COMPOSE_FILES -f docker-compose.recordings.yml"
fi
docker-compose $COMPOSE_FILES $@