html5 dev mode

This commit is contained in:
chandi 2024-11-25 17:12:29 +01:00
parent ed77742a49
commit 7c0c55a9da
5 changed files with 61 additions and 3 deletions

View File

@ -1,9 +1,7 @@
# fixed environment for an working dev setup
# enables
# - meteor dev server
# - watch & restart of bbb-grahql-actions
# - accept self signed certificates
# - html5: webpack dev server
DEV_MODE=true
# accept self signed certificates

View File

@ -6,6 +6,20 @@
{{ $ignore_tls_cert_errors := or (isTrue .Env.DEV_MODE) (isTrue .Env.IGNORE_TLS_CERT_ERRORS)}}
services:
{{ if isTrue .Env.DEV_MODE }}
html5-dev:
build:
context: mod/html5-dev
args:
BBB_BUILD_TAG: {{ .Env.BBB_BUILD_TAG }}
user: ${BBB_DEV_UID}:${BBB_DEV_GID}
restart: unless-stopped
volumes:
- ./repos/bigbluebutton/bigbluebutton-html5:/app/:rw
- ./.cache/npm:/tmp/.npm:rw
network_mode: host
{{ end }}
bbb-web:
build:
context: mod/bbb-web
@ -105,6 +119,10 @@ services:
- ./data/bigbluebutton:/var/bigbluebutton
- ${DEFAULT_PRESENTATION:-/dev/null}:/www/default.pdf
{{ if isTrue .Env.DEV_MODE }}
# overwrite html5 config
- ./mod/nginx/bbb-html5.dev.nginx:/etc/nginx/bbb/bbb-html5.nginx:ro
{{ end }}
tmpfs:
- /tmp
network_mode: host

13
mod/html5-dev/Dockerfile Normal file
View File

@ -0,0 +1,13 @@
ARG BBB_BUILD_TAG
FROM bigbluebutton/bbb-build:$BBB_BUILD_TAG
# use /tmp as home dir as writeable directory for whatever UID we get
ENV HOME /tmp
# allow all user to access .nvm in root
RUN chmod 755 /root
WORKDIR /app
COPY /entrypoint.sh /entrypoint.sh
ENTRYPOINT /entrypoint.sh

11
mod/html5-dev/entrypoint.sh Executable file
View File

@ -0,0 +1,11 @@
set -e
# enable nvm
. /root/.nvm/nvm.sh
if [ -n "$1" ]; then
exec "$@"
else
npm install
npm start -- --host 0.0.0.0
fi

View File

@ -0,0 +1,18 @@
# serve locale index from prebuilt static files
location = /html5client/locales/ {
alias /usr/share/bigbluebutton/html5-client/locales/;
autoindex on;
autoindex_format json;
}
# running from source (npm start)
location /html5client/ {
rewrite /html5client/(.*) /$1 break;
gzip_static on;
proxy_pass http://10.7.7.1:3000/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}