Skip to content

Commit 130eb55

Browse files
authored
jvb: migrate to new config file
1 parent 5290499 commit 130eb55

File tree

4 files changed

+64
-35
lines changed

4 files changed

+64
-35
lines changed

jvb/rootfs/defaults/jvb.conf

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{{ $JVB_TCP_PORT := .Env.JVB_TCP_PORT | default "4443" }}
2+
{{ $JVB_TCP_MAPPED_PORT := .Env.JVB_TCP_MAPPED_PORT | default $JVB_TCP_PORT }}
3+
{{ $PUBLIC_URL_DOMAIN := .Env.PUBLIC_URL | default "https://localhost:8443" | trimPrefix "https://" | trimSuffix "/" -}}
4+
{{ $WS_DOMAIN := .Env.JVB_WS_DOMAIN | default $PUBLIC_URL_DOMAIN -}}
5+
{{ $WS_SERVER_ID := .Env.JVB_WS_SERVER_ID | default .Env.LOCAL_ADDRESS -}}
6+
7+
videobridge {
8+
ice {
9+
udp {
10+
port = {{ .Env.JVB_PORT }}
11+
}
12+
tcp {
13+
enabled = {{ not .Env.JVB_TCP_HARVESTER_DISABLED }}
14+
port = {{ .Env.JVB_TCP_PORT }}
15+
{{ if not (eq $JVB_TCP_PORT $JVB_TCP_MAPPED_PORT) }}
16+
mapped-port = {{ $JVB_TCP_MAPPED_PORT }}
17+
{{ end }}
18+
}
19+
}
20+
apis {
21+
xmpp-client {
22+
configs {
23+
shard {
24+
HOSTNAME = "{{ .Env.XMPP_SERVER }}"
25+
DOMAIN = "{{ .Env.XMPP_AUTH_DOMAIN }}"
26+
USERNAME = "{{ .Env.JVB_AUTH_USER }}"
27+
PASSWORD = "{{ .Env.JVB_AUTH_PASSWORD }}"
28+
MUC_JIDS = "{{ .Env.JVB_BREWERY_MUC }}@{{ .Env.XMPP_INTERNAL_MUC_DOMAIN }}"
29+
MUC_NICKNAME = "{{ .Env.HOSTNAME }}"
30+
DISABLE_CERTIFICATE_VERIFICATION = true
31+
}
32+
}
33+
}
34+
}
35+
stats {
36+
enabled = true
37+
}
38+
websockets {
39+
enabled = true
40+
domain = "{{ $WS_DOMAIN }}"
41+
tls = true
42+
server-id = "{{ $WS_SERVER_ID }}"
43+
}
44+
http-servers {
45+
private {
46+
host = 0.0.0.0
47+
}
48+
}
49+
}
50+
51+
ice4j {
52+
harvest {
53+
mapping {
54+
stun {
55+
{{ if .Env.JVB_STUN_SERVERS }}
56+
addresses = [ "{{ join "\",\"" (splitList "," .Env.JVB_STUN_SERVERS) }}" ]
57+
{{ end }}
58+
}
59+
}
60+
}
61+
}
Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,5 @@
1-
org.jitsi.videobridge.SINGLE_PORT_HARVESTER_PORT={{ .Env.JVB_PORT }}
2-
org.jitsi.videobridge.DISABLE_TCP_HARVESTER={{ .Env.JVB_TCP_HARVESTER_DISABLED }}
3-
org.jitsi.videobridge.TCP_HARVESTER_PORT={{ .Env.JVB_TCP_PORT }}
4-
{{ if .Env.JVB_STUN_SERVERS }}
5-
org.ice4j.ice.harvest.STUN_MAPPING_HARVESTER_ADDRESSES={{ .Env.JVB_STUN_SERVERS }}
6-
{{ end }}
71
{{ if .Env.DOCKER_HOST_ADDRESS }}
82
org.ice4j.ice.harvest.NAT_HARVESTER_LOCAL_ADDRESS={{ .Env.LOCAL_ADDRESS }}
93
org.ice4j.ice.harvest.NAT_HARVESTER_PUBLIC_ADDRESS={{ .Env.DOCKER_HOST_ADDRESS }}
104
{{ end }}
11-
{{ $JVB_TCP_PORT := .Env.JVB_TCP_PORT | default "4443" }}
12-
{{ $JVB_TCP_MAPPED_PORT := .Env.JVB_TCP_MAPPED_PORT | default $JVB_TCP_PORT }}
13-
{{ if not (eq $JVB_TCP_PORT $JVB_TCP_MAPPED_PORT) }}
14-
org.jitsi.videobridge.TCP_HARVESTER_MAPPED_PORT={{ $JVB_TCP_MAPPED_PORT }}
15-
{{ end }}
16-
17-
org.jitsi.videobridge.xmpp.user.shard.HOSTNAME={{ .Env.XMPP_SERVER }}
18-
org.jitsi.videobridge.xmpp.user.shard.DOMAIN={{ .Env.XMPP_AUTH_DOMAIN }}
19-
org.jitsi.videobridge.xmpp.user.shard.USERNAME={{ .Env.JVB_AUTH_USER }}
20-
org.jitsi.videobridge.xmpp.user.shard.PASSWORD={{ .Env.JVB_AUTH_PASSWORD }}
21-
org.jitsi.videobridge.xmpp.user.shard.MUC_JIDS={{ .Env.JVB_BREWERY_MUC }}@{{ .Env.XMPP_INTERNAL_MUC_DOMAIN }}
22-
org.jitsi.videobridge.xmpp.user.shard.MUC_NICKNAME={{ .Env.HOSTNAME }}
23-
org.jitsi.videobridge.xmpp.user.shard.DISABLE_CERTIFICATE_VERIFICATION=true
24-
25-
org.jitsi.videobridge.ENABLE_STATISTICS=true
26-
org.jitsi.videobridge.STATISTICS_TRANSPORT=muc
27-
org.jitsi.videobridge.STATISTICS_INTERVAL=5000
28-
29-
{{ $PUBLIC_URL_DOMAIN := .Env.PUBLIC_URL | default "https://localhost:8443" | trimPrefix "https://" | trimSuffix "/" -}}
30-
{{ $WS_DOMAIN := .Env.JVB_WS_DOMAIN | default $PUBLIC_URL_DOMAIN -}}
31-
{{ $WS_SERVER_ID := .Env.JVB_WS_SERVER_ID | default .Env.LOCAL_ADDRESS -}}
32-
33-
org.jitsi.videobridge.rest.COLIBRI_WS_DISABLE=false
34-
org.jitsi.videobridge.rest.jetty.port=9090
35-
org.jitsi.videobridge.rest.COLIBRI_WS_DOMAIN={{ $WS_DOMAIN }}
36-
org.jitsi.videobridge.rest.COLIBRI_WS_TLS=true
37-
org.jitsi.videobridge.rest.COLIBRI_WS_SERVER_ID={{ $WS_SERVER_ID }}
385

39-
org.jitsi.videobridge.rest.private.jetty.host=0.0.0.0

jvb/rootfs/etc/cont-init.d/10-config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ if [[ -f /config/custom-sip-communicator.properties ]]; then
1818
cat /config/custom-sip-communicator.properties >> /config/sip-communicator.properties
1919
fi
2020

21+
tpl /defaults/jvb.conf > /config/jvb.conf
22+
2123
if [[ ! -f /config/logging.properties ]]; then
2224
cp /defaults/logging.properties /config
2325
fi

jvb/rootfs/etc/services.d/jvb/run

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/with-contenv bash
22

3-
export JAVA_SYS_PROPS="-Dnet.java.sip.communicator.SC_HOME_DIR_LOCATION=/ -Dnet.java.sip.communicator.SC_HOME_DIR_NAME=config -Djava.util.logging.config.file=/config/logging.properties"
3+
export JAVA_SYS_PROPS="-Dnet.java.sip.communicator.SC_HOME_DIR_LOCATION=/ -Dnet.java.sip.communicator.SC_HOME_DIR_NAME=config -Djava.util.logging.config.file=/config/logging.properties -Dconfig.file=/config/jvb.conf"
44

55
DAEMON=/usr/share/jitsi-videobridge/jvb.sh
66

0 commit comments

Comments
 (0)