docker/mod/html5/entrypoint.sh

39 lines
1.1 KiB
Bash
Raw Normal View History

2023-03-21 12:49:00 +01:00
#!/bin/bash
2020-12-22 00:41:01 +01:00
set -e
2020-04-09 22:33:27 +02:00
cd /app
export MONGO_OPLOG_URL=mongodb://10.7.7.6/local
2020-04-09 22:33:27 +02:00
export MONGO_URL=mongodb://10.7.7.6/meteor
export ROOT_URL=http://127.0.0.1/html5client
2020-04-09 22:33:27 +02:00
export NODE_ENV=production
2022-11-04 16:40:14 +01:00
export SERVER_WEBSOCKET_COMPRESSION='{"level":5, "maxWindowBits":13, "memLevel":7, "requestMaxWindowBits":13}'
2020-12-23 23:58:24 +01:00
export BIND_IP=0.0.0.0
export LANG=en_US.UTF-8
2020-12-23 23:58:24 +01:00
export INSTANCE_MAX=1
export ENVIRONMENT_TYPE=production
2023-01-10 17:24:33 +01:00
export NODE_VERSION=node-v14.21.1-linux-x64
2021-11-27 17:39:23 +01:00
export BBB_HTML5_LOCAL_SETTINGS=/app/bbb-html5.yml
2020-04-09 22:33:27 +02:00
if [ "$BBB_HTML5_ROLE" == "backend" ]; then
PARAM=NODEJS_BACKEND_INSTANCE_ID=$INSTANCE_ID
2020-12-22 00:41:01 +01:00
fi
2020-12-23 23:58:24 +01:00
# if container is the first frontend, do some additional tasks
if [ "$BBB_HTML5_ROLE" == "frontend" ] && [ "$INSTANCE_ID" == "1" ]; then
2020-12-23 23:58:24 +01:00
# copy static files into volume for direct access by nginx
# https://github.com/bigbluebutton/bigbluebutton/issues/10739
if [ -d "/html5-static" ]; then
rm -rf /html5-static/*
cp -r /app/programs/web.browser/* /html5-static
fi
fi
2020-12-23 23:58:24 +01:00
2020-04-10 13:29:06 +02:00
dockerize \
2021-11-27 17:39:23 +01:00
-template /app/bbb-html5.yml.tmpl:/app/bbb-html5.yml \
2023-03-21 12:49:00 +01:00
gosu meteor \
node --max-old-space-size=2048 --max_semi_space_size=128 main.js $PARAM