2020-06-06 14:39:31 +02:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
cd $(dirname $0)/..
|
|
|
|
|
|
|
|
# load .env
|
|
|
|
if [ -f .env ]
|
|
|
|
then
|
2020-07-13 16:34:09 +02:00
|
|
|
# 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)
|
2020-06-06 14:39:31 +02:00
|
|
|
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
|
2020-06-07 13:58:56 +02:00
|
|
|
|
|
|
|
if [ "$ENABLE_COTURN" == true ]; then
|
|
|
|
COMPOSE_FILES="$COMPOSE_FILES -f docker-compose.coturn.yml"
|
|
|
|
fi
|
|
|
|
|
2020-06-06 14:39:31 +02:00
|
|
|
if [ "$ENABLE_GREENLIGHT" == true ]; then
|
|
|
|
COMPOSE_FILES="$COMPOSE_FILES -f docker-compose.greenlight.yml"
|
|
|
|
fi
|
|
|
|
|
2020-06-30 19:44:20 +02:00
|
|
|
if [ "$ENABLE_WEBHOOKS" == true ]; then
|
|
|
|
COMPOSE_FILES="$COMPOSE_FILES -f docker-compose.webhooks.yml"
|
|
|
|
fi
|
|
|
|
|
2020-06-06 14:39:31 +02:00
|
|
|
docker-compose $COMPOSE_FILES $@
|