12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- {{ $COLIBRI_REST_ENABLED := .Env.COLIBRI_REST_ENABLED | default "false" | toBool }}
- {{ $ENABLE_COLIBRI_WEBSOCKET := .Env.ENABLE_COLIBRI_WEBSOCKET | default "1" | toBool }}
- {{ $ENABLE_OCTO := .Env.ENABLE_OCTO | default "0" | toBool }}
- {{ $JVB_MUC_NICKNAME := .Env.JVB_MUC_NICKNAME | default .Env.HOSTNAME -}}
- {{ $PUBLIC_URL_DOMAIN := .Env.PUBLIC_URL | default "https://localhost:8443" | trimPrefix "https://" | trimSuffix "/" -}}
- {{ $SHUTDOWN_REST_ENABLED := .Env.SHUTDOWN_REST_ENABLED | default "false" | toBool }}
- {{ $WS_DOMAIN := .Env.JVB_WS_DOMAIN | default $PUBLIC_URL_DOMAIN -}}
- {{ $WS_SERVER_ID := .Env.JVB_WS_SERVER_ID | default .Env.JVB_WS_SERVER_ID_FALLBACK -}}
- {{ $XMPP_PORT := .Env.XMPP_PORT | default "5222" -}}
- {{ $XMPP_SERVERS := splitList "," .Env.XMPP_SERVER -}}
- {{/* assign env from context, preserve during range when . is re-assigned */}}
- {{ $ENV := .Env -}}
- videobridge {
- ice {
- udp {
- port = {{ .Env.JVB_PORT }}
- }
- }
- apis {
- xmpp-client {
- configs {
- {{ range $index, $element := $XMPP_SERVERS -}}
- {{ $SERVER := splitn ":" 2 $element }}
- shard{{ $index }} {
- HOSTNAME = "{{ $SERVER._0 }}"
- PORT = "{{ $SERVER._1 | default $XMPP_PORT }}"
- DOMAIN = "{{ $ENV.XMPP_AUTH_DOMAIN }}"
- USERNAME = "{{ $ENV.JVB_AUTH_USER }}"
- PASSWORD = "{{ $ENV.JVB_AUTH_PASSWORD }}"
- MUC_JIDS = "{{ $ENV.JVB_BREWERY_MUC }}@{{ $ENV.XMPP_INTERNAL_MUC_DOMAIN }}"
- MUC_NICKNAME = "{{ $JVB_MUC_NICKNAME }}"
- DISABLE_CERTIFICATE_VERIFICATION = true
- }
- {{ end }}
- }
- }
- rest {
- enabled = {{ $COLIBRI_REST_ENABLED }}
- }
- }
- rest {
- shutdown {
- enabled = {{ $SHUTDOWN_REST_ENABLED }}
- }
- }
- stats {
- enabled = true
- }
- websockets {
- enabled = {{ $ENABLE_COLIBRI_WEBSOCKET }}
- domain = "{{ $WS_DOMAIN }}"
- tls = true
- server-id = "{{ $WS_SERVER_ID }}"
- }
- http-servers {
- private {
- host = 0.0.0.0
- }
- public {
- host = 0.0.0.0
- port = 9090
- }
- }
- {{ if $ENABLE_OCTO -}}
- octo {
- enabled = true
- bind-address = "{{ .Env.JVB_OCTO_BIND_ADDRESS | default "0.0.0.0" }}"
- public-address = "{{ .Env.JVB_OCTO_PUBLIC_ADDRESS }}"
- bind-port = "{{ .Env.JVB_OCTO_BIND_PORT | default "4096" }}"
- region = "{{ .Env.JVB_OCTO_REGION | default "europe" }}"
- }
- {{ end -}}
- }
- ice4j {
- harvest {
- mapping {
- stun {
- {{ if .Env.JVB_STUN_SERVERS -}}
- addresses = [ "{{ join "\",\"" (splitList "," .Env.JVB_STUN_SERVERS) }}" ]
- {{ else -}}
- enabled = false
- {{ end -}}
- }
- static-mappings = [
- {{ if .Env.DOCKER_HOST_ADDRESS -}}
- {
- local-address = "{{ .Env.LOCAL_ADDRESS }}"
- public-address = "{{ .Env.DOCKER_HOST_ADDRESS }}"
- }
- {{ end -}}
- ]
- }
- }
- }
|