diff --git a/docker-compose.yml b/docker-compose.yml index 08c7d39..06ba51b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -171,8 +171,8 @@ services: - XMPP_MUC_DOMAIN - XMPP_RECORDER_DOMAIN - XMPP_PORT - - WHITEBOARD_ENABLED - WHITEBOARD_COLLAB_SERVER_PUBLIC_URL + - WHITEBOARD_COLLAB_SERVER_URL_BASE networks: meet.jitsi: depends_on: diff --git a/env.example b/env.example index 485649c..dd8c50a 100644 --- a/env.example +++ b/env.example @@ -73,13 +73,24 @@ TZ=UTC # Etherpad integration (for document sharing) # -# Set etherpad-lite URL in docker local network (uncomment to enable) +# Set the etherpad-lite URL in the docker local network (uncomment to enable) #ETHERPAD_URL_BASE=http://etherpad.meet.jitsi:9001 # Set etherpad-lite public URL, including /p/ pad path fragment (uncomment to enable) #ETHERPAD_PUBLIC_URL=https://etherpad.my.domain/p/ +# +# Whiteboard integration +# + +# Set the excalidraw-backend URL in the docker local network (uncomment to enable) +#WHITEBOARD_COLLAB_SERVER_URL_BASE=http://whiteboard.meet.jitsi + +# Set the excalidraw-backend public URL (uncomment to enable) +#WHITEBOARD_COLLAB_SERVER_PUBLIC_URL=https://whiteboard.meet.my.domain + + # # Basic Jigasi configuration options (needed for SIP gateway support) # diff --git a/web/rootfs/defaults/meet.conf b/web/rootfs/defaults/meet.conf index cbd9a14..8cca756 100644 --- a/web/rootfs/defaults/meet.conf +++ b/web/rootfs/defaults/meet.conf @@ -134,6 +134,21 @@ location ^~ /etherpad/ { } {{ end }} +{{ if .Env.WHITEBOARD_COLLAB_SERVER_URL_BASE }} +# whiteboard (excalidraw-backend) +location = /socket.io/ { + proxy_buffering off; + proxy_cache_bypass $http_upgrade; + + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header X-Forwarded-For $remote_addr; + + proxy_pass {{ .Env.WHITEBOARD_COLLAB_SERVER_URL_BASE }}/socket.io/?$args; +} +{{ end }} + location ~ ^/([^/?&:'"]+)$ { try_files $uri @root_path; } diff --git a/web/rootfs/defaults/settings-config.js b/web/rootfs/defaults/settings-config.js index 4a5fbb1..0be9c80 100644 --- a/web/rootfs/defaults/settings-config.js +++ b/web/rootfs/defaults/settings-config.js @@ -62,8 +62,7 @@ {{ $ENABLE_LOCAL_RECORDING_SELF_START := .Env.ENABLE_LOCAL_RECORDING_SELF_START | default "false" | toBool -}} {{ $DISABLE_PROFILE := .Env.DISABLE_PROFILE | default "false" | toBool -}} {{ $ROOM_PASSWORD_DIGITS := .Env.ROOM_PASSWORD_DIGITS | default "false" -}} -{{ $WHITEBOARD_COLLAB_SERVER_PUBLIC_URL := .Env.WHITEBOARD_COLLAB_SERVER_PUBLIC_URL | default "" -}} -{{ $WHITEBOARD_ENABLED := .Env.WHITEBOARD_ENABLED | default "false" | toBool -}} +{{ $WHITEBOARD_ENABLED := or (.Env.WHITEBOARD_COLLAB_SERVER_PUBLIC_URL | default "" | toBool) (.Env.WHITEBOARD_COLLAB_SERVER_URL_BASE | default "" | toBool) }} {{ $TESTING_AV1_SUPPORT := .Env.TESTING_AV1_SUPPORT | default "false" | toBool -}} // Video configuration. @@ -554,7 +553,11 @@ config.e2eping.maxMessagePerSecond = {{ .Env.E2EPING_MAX_MESSAGE_PER_SECOND }}; // Settings for the Excalidraw whiteboard integration. config.whiteboard = { enabled: {{ $WHITEBOARD_ENABLED }}, - collabServerBaseUrl: '{{ $WHITEBOARD_COLLAB_SERVER_PUBLIC_URL }}' +{{ if .Env.WHITEBOARD_COLLAB_SERVER_PUBLIC_URL -}} + collabServerBaseUrl: '{{ .Env.WHITEBOARD_COLLAB_SERVER_PUBLIC_URL }}'; +{{ else if .Env.WHITEBOARD_COLLAB_SERVER_URL_BASE -}} + collabServerBaseUrl: '{{ $PUBLIC_URL }}' +{{ end -}} }; // Testing diff --git a/whiteboard.yml b/whiteboard.yml new file mode 100644 index 0000000..9984daf --- /dev/null +++ b/whiteboard.yml @@ -0,0 +1,12 @@ +version: '3.5' + +services: + whiteboard: + image: jitsi/excalidraw-backend:21 + restart: ${RESTART_POLICY:-unless-stopped} + depends_on: + - web + networks: + meet.jitsi: + aliases: + - whiteboard.meet.jitsi