diff --git a/.env.sample b/.env.sample index dcb4593..fa21fe2 100644 --- a/.env.sample +++ b/.env.sample @@ -17,6 +17,7 @@ SECRET_TURN_SECRET_VERSION=v1 ENTRYPOINT_GREENLIGHT_VERSION=v1 ENTRYPOINT_COTURN_VERSION=v1 TURNSERVER_CONF_VERSION=v1 +ENTRYPOINT_APPSAKKA_VERSION=v1 # ==================================== # ADDITIONS to BigBlueButton diff --git a/compose.yml b/compose.yml index eb3cb47..fff053b 100644 --- a/compose.yml +++ b/compose.yml @@ -262,17 +262,23 @@ services: bbb-net: ipv4_address: 10.7.7.14 - # todo: apps-akka (seems to be an bbb app integration endpoint) + # apps-akka (seems to be an bbb app integration endpoint) apps-akka: image: alangecker/bbb-docker-apps-akka:v2.7.3 - restart: unless-stopped depends_on: - redis environment: DOMAIN: ${DOMAIN} - SHARED_SECRET: /run/secret/shared_secret + # SHARED_SECRET is set via entrypoint volumes: - vol-freeswitch:/var/freeswitch/meetings + configs: + - source: entrypoint_appsakka + target: /usr/local/bin/docker-entrypoint.sh + mode: 0555 + secrets: + - shared_secret + entrypoint: /usr/local/bin/docker-entrypoint.sh networks: bbb-net: ipv4_address: 10.7.7.15 diff --git a/entrypoint.apps-akka.sh b/entrypoint.apps-akka.sh new file mode 100755 index 0000000..342c662 --- /dev/null +++ b/entrypoint.apps-akka.sh @@ -0,0 +1,24 @@ +#!/bin/sh -e + +# set shared_secret variable +if test -f "/run/secrets/shared_secret"; then + pwd=`cat /run/secrets/shared_secret` + if [ -z $pwd ]; then + echo >&2 "error: /run/secrets/shared_secret is empty" + exit 1 + fi + echo "entrypoint.apps-akka.sh setting SHARED_SECRET" + export "SHARED_SECRET"="${pwd}" + unset "pwd" +else + echo >&2 "error: /run/secrets/shared_secret does not exist" + exit 1 +fi + +TARGET=/etc/bigbluebutton/bbb-apps-akka.conf +cp /etc/bigbluebutton/bbb-apps-akka.conf.tmpl $TARGET +sed -i "s/DOMAIN/$DOMAIN/" $TARGET +sed -i "s/SHARED_SECRET/$SHARED_SECRET/" $TARGET + +cd /bbb-apps-akka +/bbb-apps-akka/bin/bbb-apps-akka