diff --git a/docker-compose.greenlight.yml b/docker-compose.greenlight.yml index 8deee44..f1485cc 100644 --- a/docker-compose.greenlight.yml +++ b/docker-compose.greenlight.yml @@ -2,7 +2,7 @@ version: '3.6' services: greenlight: - container_name: greenlight-v2 + container_name: greenlight image: bigbluebutton/greenlight:v2 env_file: .env environment: diff --git a/docker-compose.yml b/docker-compose.yml index ddfb96b..9c0bd7a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,8 +11,8 @@ services: SHARED_SECRET: ${SHARED_SECRET} WELCOME_FOOTER: ${WELCOME_FOOTER} STUN_SERVER: stun:${STUN_IP}:${STUN_PORT} - TURN_SERVER: ${TURN_SERVER} - TURN_SECRET: ${TURN_SECRET} + TURN_SERVER: ${TURN_SERVER:-} + TURN_SECRET: ${TURN_SECRET:-} volumes: - bigbluebutton:/var/bigbluebutton networks: diff --git a/scripts/compose b/scripts/compose new file mode 100755 index 0000000..2b41314 --- /dev/null +++ b/scripts/compose @@ -0,0 +1,22 @@ +#!/bin/bash +set -e + +cd $(dirname $0)/.. + +# load .env +if [ -f .env ] +then + # exclude WELCOME_FOOTER because it may contain invalid characters + export $(cat .env | sed 's/#.*//g' | grep -v "WELCOME_FOOTER" | xargs) +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_GREENLIGHT" == true ]; then + COMPOSE_FILES="$COMPOSE_FILES -f docker-compose.greenlight.yml" +fi + +docker-compose $COMPOSE_FILES $@ diff --git a/scripts/print-versions b/scripts/print-versions index 44cc0cf..b11419c 100755 --- a/scripts/print-versions +++ b/scripts/print-versions @@ -5,6 +5,7 @@ CORE_IMAGE=$(docker-compose images -q core) FREESWITCH_IMAGE=$(docker-compose images -q freeswitch) HTML5_IMAGE=$(docker-compose images -q html5) KURENTO_IMAGE=$(docker-compose images -q kurento) +ETHERPAD_IMAGE=$(docker-compose images -q etherpad) MONGO_IMAGE=$(docker-compose images -q mongodb) REDIS_IMAGE=$(docker-compose images -q redis) @@ -30,7 +31,7 @@ docker run --rm --entrypoint /bin/sh $CORE_IMAGE -c "dpkg -l 'bbb-*' | grep ii | echo "" echo "etherpad" -ETHERPAD_VERSION=$(docker-compose images etherpad | grep etherpad | awk '{print $3}') +ETHERPAD_VERSION=$(docker run --rm --entrypoint cat $ETHERPAD_IMAGE /opt/etherpad-lite/src/package.json | grep version | awk -F'"' '{print $4}') echo " version: $ETHERPAD_VERSION" echo "" diff --git a/scripts/upgrade b/scripts/upgrade index 1c0ee17..eb73733 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -7,7 +7,7 @@ if [ -z $RESTARTED ] then echo "# pull newest bigblugbutton-docker.git" - #git pull + git pull # restart script, since it might have changed. RESTARTED=1 ./scripts/upgrade @@ -20,13 +20,11 @@ else echo "" echo "# pull newest images" - docker-compose pull - docker-compose -f docker-compose.greenlight.yml pull - docker-compose -f docker-compose.https.yml pull + ./scripts/compose pull echo "" echo "# rebuild images" - docker-compose build --pull --no-cache + ./scripts/compose build --pull --no-cache COMMIT_HASH=$(git rev-parse --short HEAD) @@ -37,12 +35,7 @@ else echo "images successfully rebuilt!" echo "we are on $COMMIT_HASH ($BRANCH_NAME)" echo "" - echo "use following commands for restarting:" - echo "BigBlueButton:" - echo " $ docker-compose up -d" - echo "HTTPS Proxy:" - echo " $ docker-compose -f docker-compose.https.yml up -d" - echo "Greenlight:" - echo " $ docker-compose -f docker-compose.greenlight.yml up -d" + echo "use following command for restarting:" + echo " $ ./scripts/compose up -d" echo "-------------------------------------" fi \ No newline at end of file