2
0

jvb.conf 3.1 KB

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