Skip to content

Commit b4604f3

Browse files
loli10Ktgrldsaghul
committed
feat(whiteboard) add builtin whiteboard integration
Closes: #1480 Co-authored-by: Tugrul Dogan <[email protected]> Co-authored-by: Saúl Ibarra Corretgé <[email protected]>
1 parent 49bd165 commit b4604f3

File tree

5 files changed

+46
-5
lines changed

5 files changed

+46
-5
lines changed

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ services:
171171
- XMPP_MUC_DOMAIN
172172
- XMPP_RECORDER_DOMAIN
173173
- XMPP_PORT
174-
- WHITEBOARD_ENABLED
175174
- WHITEBOARD_COLLAB_SERVER_PUBLIC_URL
175+
- WHITEBOARD_COLLAB_SERVER_URL_BASE
176176
networks:
177177
meet.jitsi:
178178
depends_on:

env.example

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,24 @@ TZ=UTC
7373
# Etherpad integration (for document sharing)
7474
#
7575

76-
# Set etherpad-lite URL in docker local network (uncomment to enable)
76+
# Set the etherpad-lite URL in the docker local network (uncomment to enable)
7777
#ETHERPAD_URL_BASE=http://etherpad.meet.jitsi:9001
7878

7979
# Set etherpad-lite public URL, including /p/ pad path fragment (uncomment to enable)
8080
#ETHERPAD_PUBLIC_URL=https://etherpad.my.domain/p/
8181

8282

83+
#
84+
# Whiteboard integration
85+
#
86+
87+
# Set the excalidraw-backend URL in the docker local network (uncomment to enable)
88+
#WHITEBOARD_COLLAB_SERVER_URL_BASE=http://whiteboard.meet.jitsi
89+
90+
# Set the excalidraw-backend public URL (uncomment to enable)
91+
#WHITEBOARD_COLLAB_SERVER_PUBLIC_URL=https://whiteboard.meet.my.domain
92+
93+
8394
#
8495
# Basic Jigasi configuration options (needed for SIP gateway support)
8596
#

web/rootfs/defaults/meet.conf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,21 @@ location ^~ /etherpad/ {
134134
}
135135
{{ end }}
136136

137+
{{ if .Env.WHITEBOARD_COLLAB_SERVER_URL_BASE }}
138+
# whiteboard (excalidraw-backend)
139+
location = /socket.io/ {
140+
proxy_buffering off;
141+
proxy_cache_bypass $http_upgrade;
142+
143+
proxy_http_version 1.1;
144+
proxy_set_header Upgrade $http_upgrade;
145+
proxy_set_header Connection "upgrade";
146+
proxy_set_header X-Forwarded-For $remote_addr;
147+
148+
proxy_pass {{ .Env.WHITEBOARD_COLLAB_SERVER_URL_BASE }}/socket.io/?$args;
149+
}
150+
{{ end }}
151+
137152
location ~ ^/([^/?&:'"]+)$ {
138153
try_files $uri @root_path;
139154
}

web/rootfs/defaults/settings-config.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@
6262
{{ $ENABLE_LOCAL_RECORDING_SELF_START := .Env.ENABLE_LOCAL_RECORDING_SELF_START | default "false" | toBool -}}
6363
{{ $DISABLE_PROFILE := .Env.DISABLE_PROFILE | default "false" | toBool -}}
6464
{{ $ROOM_PASSWORD_DIGITS := .Env.ROOM_PASSWORD_DIGITS | default "false" -}}
65-
{{ $WHITEBOARD_COLLAB_SERVER_PUBLIC_URL := .Env.WHITEBOARD_COLLAB_SERVER_PUBLIC_URL | default "" -}}
66-
{{ $WHITEBOARD_ENABLED := .Env.WHITEBOARD_ENABLED | default "false" | toBool -}}
65+
{{ $WHITEBOARD_ENABLED := or (.Env.WHITEBOARD_COLLAB_SERVER_PUBLIC_URL | default "" | toBool) (.Env.WHITEBOARD_COLLAB_SERVER_URL_BASE | default "" | toBool) }}
6766
{{ $TESTING_AV1_SUPPORT := .Env.TESTING_AV1_SUPPORT | default "false" | toBool -}}
6867

6968
// Video configuration.
@@ -554,7 +553,11 @@ config.e2eping.maxMessagePerSecond = {{ .Env.E2EPING_MAX_MESSAGE_PER_SECOND }};
554553
// Settings for the Excalidraw whiteboard integration.
555554
config.whiteboard = {
556555
enabled: {{ $WHITEBOARD_ENABLED }},
557-
collabServerBaseUrl: '{{ $WHITEBOARD_COLLAB_SERVER_PUBLIC_URL }}'
556+
{{ if .Env.WHITEBOARD_COLLAB_SERVER_PUBLIC_URL -}}
557+
collabServerBaseUrl: '{{ .Env.WHITEBOARD_COLLAB_SERVER_PUBLIC_URL }}';
558+
{{ else if .Env.WHITEBOARD_COLLAB_SERVER_URL_BASE -}}
559+
collabServerBaseUrl: '{{ $PUBLIC_URL }}'
560+
{{ end -}}
558561
};
559562

560563
// Testing

whiteboard.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: '3.5'
2+
3+
services:
4+
whiteboard:
5+
image: jitsi/excalidraw-backend:21
6+
restart: ${RESTART_POLICY:-unless-stopped}
7+
depends_on:
8+
- web
9+
networks:
10+
meet.jitsi:
11+
aliases:
12+
- whiteboard.meet.jitsi

0 commit comments

Comments
 (0)