jvb.conf 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. {{ $COLIBRI_REST_ENABLED := .Env.COLIBRI_REST_ENABLED | default "false" | toBool -}}
  2. {{ $ENABLE_COLIBRI_WEBSOCKET := .Env.ENABLE_COLIBRI_WEBSOCKET | default "1" | toBool -}}
  3. {{ $ENABLE_OCTO := .Env.ENABLE_OCTO | default "0" | toBool -}}
  4. {{ $ENABLE_MULTI_STREAM := .Env.ENABLE_MULTI_STREAM | default "true" | toBool -}}
  5. {{ $JVB_DISABLE_STUN := .Env.JVB_DISABLE_STUN | default "0" | toBool -}}
  6. {{ $JVB_STUN_SERVERS := .Env.JVB_STUN_SERVERS | default "meet-jit-si-turnrelay.jitsi.net:443" -}}
  7. {{ $JVB_AUTH_USER := .Env.JVB_AUTH_USER | default "jvb" -}}
  8. {{ $JVB_BREWERY_MUC := .Env.JVB_BREWERY_MUC | default "jvbbrewery" -}}
  9. {{ $JVB_MUC_NICKNAME := .Env.JVB_MUC_NICKNAME | default .Env.HOSTNAME -}}
  10. {{ $PUBLIC_URL_DOMAIN := .Env.PUBLIC_URL | default "https://localhost:8443" | trimPrefix "https://" | trimSuffix "/" -}}
  11. {{ $SHUTDOWN_REST_ENABLED := .Env.SHUTDOWN_REST_ENABLED | default "false" | toBool -}}
  12. {{ $WS_DOMAIN := .Env.JVB_WS_DOMAIN | default $PUBLIC_URL_DOMAIN -}}
  13. {{ $WS_SERVER_ID := .Env.JVB_WS_SERVER_ID | default .Env.JVB_WS_SERVER_ID_FALLBACK -}}
  14. {{ $XMPP_AUTH_DOMAIN := .Env.XMPP_AUTH_DOMAIN | default "auth.meet.jitsi" -}}
  15. {{ $XMPP_INTERNAL_MUC_DOMAIN := .Env.XMPP_INTERNAL_MUC_DOMAIN | default "internal-muc.meet.jitsi" -}}
  16. {{ $XMPP_PORT := .Env.XMPP_PORT | default "5222" -}}
  17. {{ $XMPP_SERVER := .Env.XMPP_SERVER | default "xmpp.meet.jitsi" -}}
  18. {{ $XMPP_SERVERS := splitList "," $XMPP_SERVER -}}
  19. {{/* assign env from context, preserve during range when . is re-assigned */}}
  20. {{ $ENV := .Env -}}
  21. videobridge {
  22. ice {
  23. udp {
  24. port = {{ .Env.JVB_PORT | default 10000 }}
  25. }
  26. }
  27. apis {
  28. xmpp-client {
  29. configs {
  30. {{ range $index, $element := $XMPP_SERVERS -}}
  31. {{ $SERVER := splitn ":" 2 $element }}
  32. shard{{ $index }} {
  33. HOSTNAME = "{{ $SERVER._0 }}"
  34. PORT = "{{ $SERVER._1 | default $XMPP_PORT }}"
  35. DOMAIN = "{{ $XMPP_AUTH_DOMAIN }}"
  36. USERNAME = "{{ $JVB_AUTH_USER }}"
  37. PASSWORD = "{{ $ENV.JVB_AUTH_PASSWORD }}"
  38. MUC_JIDS = "{{ $JVB_BREWERY_MUC }}@{{ $XMPP_INTERNAL_MUC_DOMAIN }}"
  39. MUC_NICKNAME = "{{ $JVB_MUC_NICKNAME }}"
  40. DISABLE_CERTIFICATE_VERIFICATION = true
  41. }
  42. {{ end -}}
  43. }
  44. }
  45. rest {
  46. enabled = {{ $COLIBRI_REST_ENABLED }}
  47. }
  48. }
  49. rest {
  50. shutdown {
  51. enabled = {{ $SHUTDOWN_REST_ENABLED }}
  52. }
  53. }
  54. stats {
  55. enabled = true
  56. }
  57. websockets {
  58. enabled = {{ $ENABLE_COLIBRI_WEBSOCKET }}
  59. domain = "{{ $WS_DOMAIN }}"
  60. tls = true
  61. server-id = "{{ $WS_SERVER_ID }}"
  62. }
  63. multi-stream {
  64. enabled = {{ $ENABLE_MULTI_STREAM }}
  65. }
  66. http-servers {
  67. private {
  68. host = 0.0.0.0
  69. }
  70. public {
  71. host = 0.0.0.0
  72. port = 9090
  73. }
  74. }
  75. {{ if $ENABLE_OCTO -}}
  76. octo {
  77. enabled = true
  78. bind-address = "{{ .Env.JVB_OCTO_BIND_ADDRESS | default "0.0.0.0" }}"
  79. public-address = "{{ .Env.JVB_OCTO_PUBLIC_ADDRESS }}"
  80. bind-port = "{{ .Env.JVB_OCTO_BIND_PORT | default "4096" }}"
  81. region = "{{ .Env.JVB_OCTO_REGION | default "europe" }}"
  82. }
  83. {{ end -}}
  84. }
  85. ice4j {
  86. harvest {
  87. mapping {
  88. stun {
  89. {{ if not $JVB_DISABLE_STUN -}}
  90. addresses = [ "{{ join "\",\"" (splitList "," $JVB_STUN_SERVERS) }}" ]
  91. {{ else -}}
  92. enabled = false
  93. {{ end -}}
  94. }
  95. static-mappings = [
  96. {{ if .Env.DOCKER_HOST_ADDRESS -}}
  97. {
  98. local-address = "{{ .Env.LOCAL_ADDRESS }}"
  99. public-address = "{{ .Env.DOCKER_HOST_ADDRESS }}"
  100. }
  101. {{ end -}}
  102. ]
  103. }
  104. }
  105. }