From 082e1295dfacf0af2320369d1b6d7b04cfabe8d5 Mon Sep 17 00:00:00 2001 From: Benjamin Brauner <11899021@auf.bundeswehr.de> Date: Thu, 29 Feb 2024 13:20:50 +0100 Subject: [PATCH] adding bbb-export-annotations configurations -> to build it see necessary for the bigbluebutton source also; https://github.com/bigbluebutton/bigbluebutton/pull/19707 --- docker-compose.tmpl.yml | 21 ++++++++++ docs/network-config.md | 1 + mod/bbb-export-annotations/Dockerfile | 24 +++++++++++ .../config/settings.json | 41 +++++++++++++++++++ mod/bbb-export-annotations/entrypoint.sh | 6 +++ 5 files changed, 93 insertions(+) create mode 100644 mod/bbb-export-annotations/Dockerfile create mode 100644 mod/bbb-export-annotations/config/settings.json create mode 100755 mod/bbb-export-annotations/entrypoint.sh diff --git a/docker-compose.tmpl.yml b/docker-compose.tmpl.yml index 7c840e4..5c56c79 100644 --- a/docker-compose.tmpl.yml +++ b/docker-compose.tmpl.yml @@ -192,6 +192,27 @@ services: bbb-net: ipv4_address: 10.7.7.18 + bbb-export-annotations: + build: + context: mod/bbb-export-annotations + additional_contexts: + bigbluebutton: ./repos/bigbluebutton + image: alangecker/bbb-docker-bbb-export-annotations:v2.7.0 + restart: unless-stopped + depends_on: + - redis + - etherpad + - bbb-pads + networks: + # need connections to: + # https://github.com/bigbluebutton/bigbluebutton/blob/v2.7.0/bbb-export-annotations/config/settings.json + # "bbbWebAPI": "http://127.0.0.1:8090", -> bbb-web + # "bbbPadsAPI": "http://127.0.0.1:9002", -> bbb-pads + bbb-net: + ipv4_address: 10.7.7.19 + volumes: + - bigbluebutton:/var/bigbluebutton + redis: image: redis:7.2-alpine restart: unless-stopped diff --git a/docs/network-config.md b/docs/network-config.md index 8382fb9..3289183 100644 --- a/docs/network-config.md +++ b/docs/network-config.md @@ -24,6 +24,7 @@ Services as configured. | coturn | network_mode: host | | | greenlight | | | ports: 10.7.7.1:5000:80 | prometheus | bbb-net | 10.7.7.33 | +| bbb-export-annotations | bbb-net | 10.7.7.19 | ```yml networks: diff --git a/mod/bbb-export-annotations/Dockerfile b/mod/bbb-export-annotations/Dockerfile new file mode 100644 index 0000000..0723860 --- /dev/null +++ b/mod/bbb-export-annotations/Dockerfile @@ -0,0 +1,24 @@ +FROM node:18-bullseye-slim AS builder + +COPY --from=bigbluebutton /bbb-export-annotations /bbb-export-annotations +RUN cd /bbb-export-annotations && npm ci && npm install + +# -------------------- + +FROM node:18-bullseye-slim + +#depends on; +#Depends: nodejs,npm,bbb-apps-akka,bbb-web,cairosvg,ghostscript,imagemagick, nodejs (>= 18), nodejs (<< 20) +#see repo https://ubuntu.bigbluebutton.org/focal-270/ bigbluebutton-focal main +#apt info bbb-export-annotations +#missing dependency: poppler-utils for pdftocairo bin -> covert background / original presentation to png +RUN apt update && apt install -y \ + nodejs npm cairosvg ghostscript imagemagick nodejs poppler-utils +# && useradd --uid 2004 --create-home --user-group bbb-export + +COPY --from=builder /bbb-export-annotations /bbb-export-annotations +#we need acces to volume bigbluebutton! +USER root +COPY ./config/settings.json /bbb-export-annotations/config/settings.json +COPY entrypoint.sh /entrypoint.sh +ENTRYPOINT /entrypoint.sh diff --git a/mod/bbb-export-annotations/config/settings.json b/mod/bbb-export-annotations/config/settings.json new file mode 100644 index 0000000..3283a8b --- /dev/null +++ b/mod/bbb-export-annotations/config/settings.json @@ -0,0 +1,41 @@ +{ + "log": { + "level": "info", + "msgName": "PresAnnStatusMsg" + }, + "shared": { + "presDir": "/var/bigbluebutton", + "presAnnDropboxDir": "/tmp/pres-ann-dropbox", + "cairosvg": "/usr/bin/cairosvg", + "ghostscript": "/usr/bin/gs", + "imagemagick": "/usr/bin/convert", + "pdftocairo": "/usr/bin/pdftocairo" + }, + "collector": { + "pngWidthRasterizedSlides": 2560 + }, + "process": { + "whiteboardTextEncoding": "utf-8", + "maxImageWidth": 1440, + "maxImageHeight": 1080, + "textScaleFactor": 2, + "pointsPerInch": 72, + "pixelsPerInch": 96 + }, + "notifier": { + "pod_id": "DEFAULT_PRESENTATION_POD", + "is_downloadable": "false", + "msgName": "NewPresFileAvailableMsg" + }, + "bbbWebAPI": "http://bbb-web:8090", + "bbbPadsAPI": "http://bbb-pads:9002", + "redis": { + "host": "redis", + "port": 6379, + "password": null, + "channels": { + "queue": "exportJobs", + "publish": "to-akka-apps-redis-channel" + } + } +} diff --git a/mod/bbb-export-annotations/entrypoint.sh b/mod/bbb-export-annotations/entrypoint.sh new file mode 100755 index 0000000..a637c84 --- /dev/null +++ b/mod/bbb-export-annotations/entrypoint.sh @@ -0,0 +1,6 @@ +#!/bin/sh +set -e + +cd /bbb-export-annotations +export NODE_ENV=production +npm start