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

add env variables EVENT_LOOPS and ALLOW_LOOP_INDICATION #7

Merged
merged 1 commit into from
Nov 12, 2023
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
7 changes: 7 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ MAX_CCU=1000
MESSAGE_THREADS=0
```

In order to take advantage of event loops / loop indication, the respective environment variables are available:

```
EVENT_LOOPS="true"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not "true", 8 for example (number of CPUs)
Can you remove the quotes from the values for consistency with the other variables in this doc.
Also please add the two variables in docker/docker-compose.yml as well.
You can add a reference to https://github.com/meetecho/janus-gateway/pull/2450 for context.
Also please specify you will need to configure adapter.setEventLoops(8) (same value that what you configured in the environment variable) with naf-janus-adapter as well.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you at least fix EVENT_LOOPS="true" by EVENT_LOOPS=8 please? I'll merge and add some more text to the doc. Thanks.

ALLOW_LOOP_INDICATION="true"
```

The default values are defined at the beginning of the `start.sh` script.

## Installing docker
Expand Down
12 changes: 12 additions & 0 deletions docker/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,18 @@ if [ ! -z "$AUTH_KEY" ]; then
/usr/etc/janus/janus.plugin.sfu.cfg
fi

if [ ! -z "$EVENT_LOOPS" ]; then
sed -i \
-e "s|#event_loops =.*|event_loops = ${EVENT_LOOPS}|" \
/usr/etc/janus/janus.jcfg
fi

if [ ! -z "$ALLOW_LOOP_INDICATION" ]; then
sed -i \
-e "s|#allow_loop_indication =.*|allow_loop_indication = ${ALLOW_LOOP_INDICATION}|" \
/usr/etc/janus/janus.cfg
fi

MAX_ROOM_SIZE=${MAX_ROOM_SIZE:-30}
MAX_CCU=${MAX_CCU:-1000}
MESSAGE_THREADS=${MESSAGE_THREADS:-0}
Expand Down