Skip to content

Commit

Permalink
feat(whiteboard) add builtin whiteboard integration
Browse files Browse the repository at this point in the history
  • Loading branch information
loli10K authored and saghul committed Jul 2, 2024
1 parent 980703b commit 160897c
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
15 changes: 15 additions & 0 deletions web/rootfs/defaults/meet.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
{{ $XMPP_DOMAIN := .Env.XMPP_DOMAIN | default "meet.jitsi" -}}
{{ $XMPP_BOSH_URL_BASE := .Env.XMPP_BOSH_URL_BASE | default "http://xmpp.meet.jitsi:5280" -}}
{{ $CORS_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN := .Env.CORS_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN | default "*" }}
{{ $WHITEBOARD_ENABLED := .Env.WHITEBOARD_ENABLED | default "false" | toBool -}}

server_name _;

Expand Down Expand Up @@ -134,6 +135,20 @@ location ^~ /etherpad/ {
}
{{ end }}

{{ if $WHITEBOARD_ENABLED }}
# whiteboard (excalidraw-backend)
location = /socket.io/ {
tcp_nodelay on;

proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;

proxy_pass http://whiteboard.meet.jitsi/socket.io/?$args;
}
{{ end }}

location ~ ^/([^/?&:'"]+)$ {
try_files $uri @root_path;
}
Expand Down
6 changes: 5 additions & 1 deletion web/rootfs/defaults/settings-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,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: '{{ $WHITEBOARD_COLLAB_SERVER_PUBLIC_URL }}';
{{ else }}
collabServerBaseUrl: '{{ $PUBLIC_URL }}'
{{ end }}
};

// Testing
Expand Down
12 changes: 12 additions & 0 deletions whiteboard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: '3.5'

services:
whiteboard:
image: jitsi/excalidraw-backend:${JITSI_IMAGE_VERSION:-unstable}
restart: ${RESTART_POLICY:-unless-stopped}
depends_on:
- web
networks:
meet.jitsi:
aliases:
- whiteboard.meet.jitsi

0 comments on commit 160897c

Please sign in to comment.