Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

whiteboard.yml: add collaborative whiteboard addon #1794

Merged
merged 1 commit into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
13 changes: 12 additions & 1 deletion env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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)
#
Expand Down
15 changes: 15 additions & 0 deletions web/rootfs/defaults/meet.conf
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,21 @@ location ^~ /etherpad/ {
}
{{ end }}

{{ if .Env.WHITEBOARD_COLLAB_SERVER_URL_BASE }}
# whiteboard (excalidraw-backend)
location = /socket.io/ {
saghul marked this conversation as resolved.
Show resolved Hide resolved
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;
}
Expand Down
9 changes: 6 additions & 3 deletions web/rootfs/defaults/settings-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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 }}'
saghul marked this conversation as resolved.
Show resolved Hide resolved
{{ 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:21
restart: ${RESTART_POLICY:-unless-stopped}
depends_on:
- web
networks:
meet.jitsi:
aliases:
- whiteboard.meet.jitsi
Loading