2
0

jvb.conf 3.1 KB

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